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