Flush even before we get end of message

This commit is contained in:
David Fowler 2016-10-07 01:06:04 -07:00
parent bbecb0c0dc
commit eef2f14c78
1 changed files with 4 additions and 7 deletions

View File

@ -54,14 +54,11 @@ namespace Microsoft.AspNetCore.Sockets
{ {
outputBuffer.Advance(result.Count); outputBuffer.Advance(result.Count);
if (result.EndOfMessage) // Flush the written data to the channel
{ await outputBuffer.FlushAsync();
// Flush when we get an entire message
await outputBuffer.FlushAsync();
// Allocate a new buffer to further writing // Allocate a new buffer to further writing
outputBuffer = _channel.Input.Alloc(); outputBuffer = _channel.Input.Alloc();
}
} }
else else
{ {