[Modify] Polish it

This commit is contained in:
sta 2020-01-21 21:39:20 +09:00
parent ead65d18ec
commit 4e003b9c7a

View File

@ -822,16 +822,16 @@ namespace WebSocketSharp.Net
private void close (byte[] responseEntity, int bufferLength, bool willBlock) private void close (byte[] responseEntity, int bufferLength, bool willBlock)
{ {
var output = OutputStream; var stream = OutputStream;
if (willBlock) { if (willBlock) {
output.WriteBytes (responseEntity, bufferLength); stream.WriteBytes (responseEntity, bufferLength);
close (false); close (false);
return; return;
} }
output.WriteBytesAsync ( stream.WriteBytesAsync (
responseEntity, responseEntity,
bufferLength, bufferLength,
() => close (false), () => close (false),