aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
diff options
context:
space:
mode:
authorcrobibero <cody@robibe.ro>2020-09-03 12:14:11 -0600
committercrobibero <cody@robibe.ro>2020-09-03 12:14:11 -0600
commita523ff840c4f4a83800bca02280e5b0f7765658b (patch)
tree5178a9806f056266ab3c28554ef4dc2fe46e255d /Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
parentcb44f16068bb66db7e35e473530c0a85583c2511 (diff)
parent645db0524fb1368135ecea9e5b776ad9b490b17b (diff)
Merge remote-tracking branch 'upstream/master' into output-formatters
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/WebSocketConnection.cs')
-rw-r--r--Emby.Server.Implementations/HttpServer/WebSocketConnection.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
index d738047e0..7eae4e764 100644
--- a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
+++ b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
@@ -179,7 +179,7 @@ namespace Emby.Server.Implementations.HttpServer
return;
}
- WebSocketMessage<object> stub;
+ WebSocketMessage<object>? stub;
try
{
@@ -209,6 +209,12 @@ namespace Emby.Server.Implementations.HttpServer
return;
}
+ if (stub == null)
+ {
+ _logger.LogError("Error processing web socket message");
+ return;
+ }
+
// Tell the PipeReader how much of the buffer we have consumed
reader.AdvanceTo(buffer.End);