mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 06:53:07 +03:00
close web socket gracefully to reduce error messages in server log
This commit is contained in:
@@ -88,6 +88,12 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
break;
|
||||
}
|
||||
|
||||
if (bytes == null)
|
||||
{
|
||||
// Connection closed
|
||||
break;
|
||||
}
|
||||
|
||||
if (OnReceiveBytes != null)
|
||||
{
|
||||
OnReceiveBytes(bytes);
|
||||
@@ -110,7 +116,8 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
||||
|
||||
if (result.CloseStatus.HasValue)
|
||||
{
|
||||
throw new WebSocketException("Connection closed");
|
||||
_logger.Info("Web socket connection closed.");
|
||||
return null;
|
||||
}
|
||||
|
||||
return buffer.Array;
|
||||
|
||||
Reference in New Issue
Block a user