diff options
| author | Claus Vium <clausvium@gmail.com> | 2019-03-07 22:26:23 +0100 |
|---|---|---|
| committer | Claus Vium <clausvium@gmail.com> | 2019-03-07 22:26:23 +0100 |
| commit | 3fa43a1e08a719e65ed38a57b556be0c0edacaef (patch) | |
| tree | ef09ca25211c98628767e7362fe74a03ac7458a2 /Emby.Server.Implementations/SocketSharp/WebSocketSharpListener.cs | |
| parent | 10a0d6bdba821449abfb1d48e9708ba6f3fc6a62 (diff) | |
Don't set status code if response is closed
Diffstat (limited to 'Emby.Server.Implementations/SocketSharp/WebSocketSharpListener.cs')
| -rw-r--r-- | Emby.Server.Implementations/SocketSharp/WebSocketSharpListener.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Emby.Server.Implementations/SocketSharp/WebSocketSharpListener.cs b/Emby.Server.Implementations/SocketSharp/WebSocketSharpListener.cs index 2df826957..dd313b336 100644 --- a/Emby.Server.Implementations/SocketSharp/WebSocketSharpListener.cs +++ b/Emby.Server.Implementations/SocketSharp/WebSocketSharpListener.cs @@ -90,7 +90,10 @@ namespace Emby.Server.Implementations.SocketSharp catch (Exception ex) { _logger.LogError(ex, "AcceptWebSocketAsync error"); - ctx.Response.StatusCode = 500; + if (!ctx.Response.HasStarted) + { + ctx.Response.StatusCode = 500; + } } } |
