Better messaging and better rule implementation
All checks were successful
All checks were successful
This commit is contained in:
@@ -16,6 +16,9 @@ public static class WebsocketManager
|
||||
|
||||
public static async void CloseAsync(WebSocket webSocket, WebSocketReceiveResult result)
|
||||
{
|
||||
await webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None);
|
||||
if (webSocket.State is WebSocketState.Open or WebSocketState.CloseReceived or WebSocketState.CloseSent)
|
||||
{
|
||||
await webSocket.CloseAsync(result.CloseStatus.Value, result.CloseStatusDescription, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user