From a304b6ce5960659b82b1018cf40322bf7a5bc290 Mon Sep 17 00:00:00 2001 From: sta Date: Sat, 21 Jun 2025 15:58:21 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/WebSocket.cs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/websocket-sharp/WebSocket.cs b/websocket-sharp/WebSocket.cs index fd22d9c1..0a28a14f 100644 --- a/websocket-sharp/WebSocket.cs +++ b/websocket-sharp/WebSocket.cs @@ -1464,19 +1464,18 @@ namespace WebSocketSharp if (_credentials == null) return null; - if (_authChallenge != null) { - var ret = new AuthenticationResponse ( - _authChallenge, - _credentials, - _nonceCount - ); + if (_authChallenge == null) + return _preAuth ? new AuthenticationResponse (_credentials) : null; - _nonceCount = ret.NonceCount; + var ret = new AuthenticationResponse ( + _authChallenge, + _credentials, + _nonceCount + ); - return ret; - } + _nonceCount = ret.NonceCount; - return _preAuth ? new AuthenticationResponse (_credentials) : null; + return ret; } // As client