|
|
|
|
@ -2613,7 +2613,11 @@ namespace WebSocketSharp
|
|
|
|
|
throw new ArgumentException (msg, "code");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!reason.IsNullOrEmpty ()) {
|
|
|
|
|
if (reason.IsNullOrEmpty ()) {
|
|
|
|
|
close (code, String.Empty);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (code == 1005) {
|
|
|
|
|
var msg = "1005 cannot be used.";
|
|
|
|
|
throw new ArgumentException (msg, "code");
|
|
|
|
|
@ -2629,7 +2633,6 @@ namespace WebSocketSharp
|
|
|
|
|
var msg = "Its size is greater than 123 bytes.";
|
|
|
|
|
throw new ArgumentOutOfRangeException ("reason", msg);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
close (code, reason);
|
|
|
|
|
}
|
|
|
|
|
|