[Modify] Move it

This commit is contained in:
sta 2020-02-07 21:48:19 +09:00
parent 5c4eec3e9d
commit 0d7b507cee

View File

@ -150,10 +150,6 @@ namespace WebSocketSharp.Net
}
flushBody (closing);
if (closing && _sendChunked)
_write (_lastChunk, 0, 5);
return true;
}
@ -183,7 +179,15 @@ namespace WebSocketSharp.Net
}
}
_body = !closing ? new MemoryStream () : null;
if (closing) {
if (_sendChunked)
_write (_lastChunk, 0, 5);
_body = null;
}
else {
_body = new MemoryStream ();
}
}
private bool flushHeaders (bool closing)