Browse Source

[Modify] Polish it

pull/298/merge
sta 6 months ago
parent
commit
a5e6903252
  1. 5
      websocket-sharp/WebSocket.cs

5
websocket-sharp/WebSocket.cs

@ -2873,12 +2873,13 @@ namespace WebSocketSharp
throw new ArgumentException (msg, "code"); throw new ArgumentException (msg, "code");
} }
} }
if (!_client && code == CloseStatusCode.MandatoryExtension) {
else {
if (code == CloseStatusCode.MandatoryExtension) {
var msg = "MandatoryExtension cannot be used."; var msg = "MandatoryExtension cannot be used.";
throw new ArgumentException (msg, "code"); throw new ArgumentException (msg, "code");
} }
}
if (reason.IsNullOrEmpty ()) { if (reason.IsNullOrEmpty ()) {
close ((ushort) code, String.Empty); close ((ushort) code, String.Empty);

Loading…
Cancel
Save