Skip to content

Commit 3ec9d2b

Browse files
committed
Drop log level of aborted websocket exception thrown when closing websocket
1 parent 3d021c9 commit 3ec9d2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/net45/Extensions/WampSharp.WebSockets/WebSockets/WebSocketWrapperConnection.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ await mWebSocket.CloseAsync(WebSocketCloseStatus.NormalClosure,
134134
CancellationToken.None)
135135
.ConfigureAwait(false);
136136
}
137+
catch (WebSocketException ex) when (ex.WebSocketErrorCode == WebSocketError.InvalidState)
138+
{
139+
mLogger.DebugException("Failed closing the websocket as it was already aborted", ex);
140+
}
137141
catch (Exception ex)
138142
{
139143
mLogger.WarnException("Failed sending a close message to client", ex);

0 commit comments

Comments
 (0)