Skip to content

Commit 6d6e733

Browse files
committed
Handle message loop errors by terminating
1 parent 94d88ce commit 6d6e733

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Common/Websocket/WebsockBaseController.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ private async Task MessageLoop()
197197
catch (Exception e)
198198
{
199199
Logger.LogError(e, "Error while sending message to client - {Msg}", JsonSerializer.Serialize(msg));
200+
await ForceClose(WebSocketCloseStatus.InternalServerError, "Internal server error, error sending message to websocket client");
200201
throw;
201202
}
202203
}

0 commit comments

Comments
 (0)