aboutsummaryrefslogtreecommitdiff
path: root/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
diff options
context:
space:
mode:
authorCody Robibero <cody@robibe.ro>2026-07-25 12:52:11 -0400
committerGitHub <noreply@github.com>2026-07-25 12:52:11 -0400
commit86ac1aaa6b69ed34f0b438167b4d01f1ddae0c4d (patch)
tree11c5d428be96cb34f7a9cc6ca3918b4566650219 /Emby.Server.Implementations/HttpServer/WebSocketConnection.cs
parent1bfbad24200e89273464d6aabcbb1d36ac1813df (diff)
parent45ec0ed8b5cd92226ff7767d654dd93b1a2036f5 (diff)
Merge branch 'master' into fix/create_library_thumbs_on_first_scan
Diffstat (limited to 'Emby.Server.Implementations/HttpServer/WebSocketConnection.cs')
-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;
}