diff --git a/DysonNetwork.Ring/Connection/WebSocketController.cs b/DysonNetwork.Ring/Connection/WebSocketController.cs index 4e1eeac..5fc710c 100644 --- a/DysonNetwork.Ring/Connection/WebSocketController.cs +++ b/DysonNetwork.Ring/Connection/WebSocketController.cs @@ -84,6 +84,15 @@ public class WebSocketController( { await _ConnectionEventLoop(deviceId, currentUser, webSocket, cts.Token); } + catch (WebSocketException ex) when (ex.Message.Contains("The remote party closed the WebSocket connection without completing the close handshake")) + { + logger.LogDebug( + "WebSocket disconnected with user @{UserName}#{UserId} and device #{DeviceId} - client closed connection without proper handshake", + currentUser.Name, + currentUser.Id, + deviceId + ); + } catch (Exception ex) { logger.LogError(ex, @@ -152,4 +161,4 @@ public class WebSocketController( } } } -} \ No newline at end of file +}