[Modify] Polish it

This commit is contained in:
sta 2017-04-11 17:23:28 +09:00
parent 7ac427d7a6
commit 822b9eb6f4

View File

@ -768,8 +768,10 @@ namespace WebSocketSharp.Server
var bytes = stream.ReadBytes (length);
var len = bytes.Length;
if (len == 0)
throw new ArgumentException ("No data could be read from it.", "stream");
if (len == 0) {
var msg = "No data could be read from it.";
throw new ArgumentException (msg, "stream");
}
if (len < length) {
_logger.Warn (