diff options
| author | Bond-009 <bond.009@outlook.com> | 2020-08-26 18:59:46 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-26 18:59:46 +0200 |
| commit | 4f6c98b325aa544ac1f3a522ea668b3f990265e3 (patch) | |
| tree | 40c38d1a8d4214722b2fed816616cc0a22de7577 /Emby.Server.Implementations/HttpServer/WebSocketConnection.cs | |
| parent | 4e3f26b647a9fe996b5a96ea10fa1f2468ea41fb (diff) | |
| parent | de4cfa223498dde4e665c452337f032c29270abe (diff) | |
Merge pull request #3984 from crobibero/json-prerelease
Use Prerelease System.Text.Json
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); |
