mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-27 04:16:47 +00:00
update shutdown
This commit is contained in:
parent
f3c3c74d84
commit
c94706d6ee
3 changed files with 39 additions and 2 deletions
|
|
@ -179,6 +179,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
|
||||
private void OnWebSocketConnecting(WebSocketConnectingEventArgs args)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (WebSocketConnecting != null)
|
||||
{
|
||||
WebSocketConnecting(this, args);
|
||||
|
|
@ -187,6 +192,11 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
|
||||
private void OnWebSocketConnected(WebSocketConnectEventArgs args)
|
||||
{
|
||||
if (_disposed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (WebSocketConnected != null)
|
||||
{
|
||||
WebSocketConnected(this, args);
|
||||
|
|
@ -331,6 +341,13 @@ namespace MediaBrowser.Server.Implementations.HttpServer
|
|||
|
||||
var httpRes = httpReq.Response;
|
||||
|
||||
if (_disposed)
|
||||
{
|
||||
httpRes.StatusCode = 503;
|
||||
httpRes.Close();
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
var operationName = httpReq.OperationName;
|
||||
var localPath = url.LocalPath;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue