diff options
| author | crobibero <cody@robibe.ro> | 2020-09-03 08:06:40 -0600 |
|---|---|---|
| committer | crobibero <cody@robibe.ro> | 2020-09-03 08:06:40 -0600 |
| commit | bebb0afb528636659bfb4d635acf77c4e83daa55 (patch) | |
| tree | 273f087464d28a7b3fa8877477a809ee42d63ebe /Emby.Server.Implementations/HttpServer/WebSocketConnection.cs | |
| parent | 1d9285c59443692008514aea0a3a30ff11b468de (diff) | |
| parent | 3711a1978e8a400aa28dd75ce8ffb08ac43106e1 (diff) | |
Merge remote-tracking branch 'upstream/master' into api-doc-css
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/WebSocketConnection.cs')
| -rw-r--r-- | Emby.Server.Implementations/HttpServer/WebSocketConnection.cs | 8 |
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); |
