From 555752482cad9b9150dc665fff01811065a7e503 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 22 Mar 2022 10:49:37 +0000 Subject: [PATCH] Ensure the actor runs again --- roomserver/internal/input/input.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/roomserver/internal/input/input.go b/roomserver/internal/input/input.go index 86440b2d9..e9d137be8 100644 --- a/roomserver/internal/input/input.go +++ b/roomserver/internal/input/input.go @@ -120,6 +120,7 @@ func (w *worker) next() { if len(msgs) != 1 { return } + defer w.Act(nil, w.next) case context.DeadlineExceeded: logrus.Infof("Stream for room %q idle, shutting down", w.roomID) if err = w.subscription.Unsubscribe(); err != nil { @@ -140,7 +141,6 @@ func (w *worker) next() { } msg := msgs[0] - var inputRoomEvent api.InputRoomEvent if err = json.Unmarshal(msg.Data, &inputRoomEvent); err != nil { _ = msg.Term() @@ -174,8 +174,6 @@ func (w *worker) next() { }).Warn("Roomserver failed to respond for sync event") } } - - w.Act(nil, w.next) } // InputRoomEvents implements api.RoomserverInternalAPI