소스 검색

Try another fix

Claus Vium 6 년 전
부모
커밋
5262e50fee
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 6
      Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs

+ 2 - 6
Jellyfin.Server/SocketSharp/WebSocketSharpListener.cs

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