[Modify] Polish it

This commit is contained in:
sta 2021-02-03 19:38:48 +09:00
parent f698486de3
commit 3db97ec838

View File

@ -218,14 +218,15 @@ namespace WebSocketSharp.Net
if (asyncResult is HttpStreamAsyncResult) {
var ares = (HttpStreamAsyncResult) asyncResult;
if (!ares.IsCompleted)
ares.AsyncWaitHandle.WaitOne ();
return ares.SyncRead;
}
// Close on exception?
var nread = _stream.EndRead (asyncResult);
if (nread > 0 && _bodyLeft > 0)
_bodyLeft -= nread;