mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
Fix WebSocket disconnecting when exception is thrown during processing (#11395)
This commit is contained in:
parent
e42325883f
commit
43569082f9
@ -199,13 +199,20 @@ namespace Emby.Server.Implementations.HttpServer
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await OnReceive(
|
try
|
||||||
new WebSocketMessageInfo
|
{
|
||||||
{
|
await OnReceive(
|
||||||
MessageType = stub.MessageType,
|
new WebSocketMessageInfo
|
||||||
Data = stub.Data?.ToString(), // Data can be null
|
{
|
||||||
Connection = this
|
MessageType = stub.MessageType,
|
||||||
}).ConfigureAwait(false);
|
Data = stub.Data?.ToString(), // Data can be null
|
||||||
|
Connection = this
|
||||||
|
}).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
_logger.LogWarning(exception, "Failed to process WebSocket message");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user