[Modify] Polish it

This commit is contained in:
sta 2020-03-10 20:57:36 +09:00
parent 45a72e9b88
commit a08b29ff1c

View File

@ -839,7 +839,12 @@ namespace WebSocketSharp.Net
value = value.Trim ();
if (value.Length > 65535) {
var len = value.Length;
if (len == 0)
return value;
if (len > 65535) {
var msg = "The length is greater than 65,535 characters.";
throw new ArgumentOutOfRangeException ("value", msg);