[Modify] Polish it
This commit is contained in:
parent
8cfe277d95
commit
c86e317ef1
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user