[Modify] Polish it

This commit is contained in:
sta 2017-04-10 14:10:19 +09:00
parent e17e9adf2f
commit 2ef6af69fe

View File

@ -593,8 +593,10 @@ namespace WebSocketSharp.Server
throw new ArgumentNullException ("data");
byte[] bytes;
if (!data.TryGetUTF8EncodedBytes (out bytes))
throw new ArgumentException ("It could not be UTF-8-encoded.", "data");
if (!data.TryGetUTF8EncodedBytes (out bytes)) {
var msg = "It could not be UTF-8-encoded.";
throw new ArgumentException (msg, "data");
}
if (bytes.LongLength <= WebSocket.FragmentLength)
broadcast (Opcode.Text, bytes, null);