Try another fix

This commit is contained in:
Claus Vium 2019-02-24 22:28:46 +01:00
parent 6e07eab247
commit 5262e50fee

View file

@ -171,17 +171,13 @@ namespace Jellyfin.Server.SocketSharp
else else
{ {
_logger.LogWarning("Web socket connection not allowed"); _logger.LogWarning("Web socket connection not allowed");
statusCode = 401; TryClose(ctx, 401);
} }
} }
catch (Exception ex) catch (Exception ex)
{ {
_logger.LogError(ex, "AcceptWebSocketAsync error"); _logger.LogError(ex, "AcceptWebSocketAsync error");
statusCode = 500; TryClose(ctx, 500);
}
finally
{
TryClose(ctx, statusCode);
} }
} }