aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer
diff options
context:
space:
mode:
authorDmitry Lyzo <ashephard0@gmail.com>2026-08-03 21:49:52 +0300
committerDmitry Lyzo <ashephard0@gmail.com>2026-08-04 16:50:13 +0300
commit27db9c886735e278f2b8b75e3213f28a4666247d (patch)
treed4f4ce5ae438b2cc2a8daa9dc41a3dad2ba0b22e /Emby.Server.Implementations/HttpServer
parentcb131ecbb704041bbb776570e31ce2a146989593 (diff)
parent7fbc1ff8c0192b608a493324f2b7eafcf0a4383e (diff)
Merge remote-tracking branch 'origin/master' into is-stream-compatible
Diffstat (limited to 'Emby.Server.Implementations/HttpServer')
-rw-r--r--Emby.Server.Implementations/HttpServer/WebSocketConnection.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
index e9bf3b93a7..dc7f972c13 100644
--- a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
+++ b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
@@ -127,8 +127,12 @@ namespace Emby.Server.Implementations.HttpServer
{
receiveResult = await _socket.ReceiveAsync(memory, cancellationToken).ConfigureAwait(false);
}
- catch (WebSocketException ex)
+ catch (Exception ex) when (ex is WebSocketException or ObjectDisposedException or OperationCanceledException)
{
+ // ObjectDisposedException/OperationCanceledException: the socket was torn
+ // down underneath us (e.g. by the keep-alive watchdog after the connection
+ // was declared lost). Fall through so Closed is still raised and the
+ // session can release this connection.
_logger.LogWarning("WS {IP} error receiving data: {Message}", RemoteEndPoint, ex.Message);
break;
}