aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-18 16:21:48 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-10-18 16:21:48 -0400
commita36873f890576759e1d43cd29f7517da91ae7474 (patch)
tree9b1f5ede5cb6db0644a6e7492e46dcf75462cc67 /MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
parent088c77674b5eda627798bbba3bdb528c2fb0f170 (diff)
look at close status before assuming socket is closed.
Diffstat (limited to 'MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs')
-rw-r--r--MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs b/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
index e1f00951e..ae4d91148 100644
--- a/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
+++ b/MediaBrowser.Server.Implementations/HttpServer/NativeWebSocket.cs
@@ -120,9 +120,9 @@ namespace MediaBrowser.Server.Implementations.HttpServer
var result = await WebSocket.ReceiveAsync(buffer, cancellationToken).ConfigureAwait(false);
- if (result.CloseStatus.HasValue)
+ if (result.CloseStatus.HasValue && result.CloseStatus.Value != WebSocketCloseStatus.Empty)
{
- _logger.Info("Web socket connection closed by client.");
+ _logger.Info("Web socket connection closed by client. Reason: {0}", result.CloseStatus.Value);
return null;
}