Fix WebSocket disconnecting when exception is thrown during processing (#11395)
This commit is contained in:
parent
e42325883f
commit
43569082f9
|
@ -198,6 +198,8 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
await SendKeepAliveResponse().ConfigureAwait(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
await OnReceive(
|
||||
new WebSocketMessageInfo
|
||||
|
@ -207,6 +209,11 @@ namespace Emby.Server.Implementations.HttpServer
|
|||
Connection = this
|
||||
}).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
_logger.LogWarning(exception, "Failed to process WebSocket message");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal InboundWebSocketMessage<object>? DeserializeWebSocketMessage(ReadOnlySequence<byte> bytes, out long bytesConsumed)
|
||||
|
|
Loading…
Reference in New Issue
Block a user