diff --git a/src/net45/Extensions/WampSharp.WebSockets/WebSockets/WebSocketWrapperConnection.cs b/src/net45/Extensions/WampSharp.WebSockets/WebSockets/WebSocketWrapperConnection.cs index da2dff31b..1b94593a8 100644 --- a/src/net45/Extensions/WampSharp.WebSockets/WebSockets/WebSocketWrapperConnection.cs +++ b/src/net45/Extensions/WampSharp.WebSockets/WebSockets/WebSocketWrapperConnection.cs @@ -134,6 +134,10 @@ await mWebSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, CancellationToken.None) .ConfigureAwait(false); } + catch (WebSocketException ex) when (ex.WebSocketErrorCode == WebSocketError.InvalidState) + { + mLogger.DebugException("Failed closing the websocket as it was already aborted", ex); + } catch (Exception ex) { mLogger.WarnException("Failed sending a close message to client", ex);