mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 07:10:45 +00:00
close web socket gracefully to reduce error messages in server log
This commit is contained in:
parent
52ca9527cc
commit
8398a5a32e
3 changed files with 27 additions and 10 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue