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,15 +54,12 @@ namespace Microsoft.AspNetCore.Sockets
{ {
outputBuffer.Advance(result.Count); outputBuffer.Advance(result.Count);
if (result.EndOfMessage) // Flush the written data to the channel
{
// Flush when we get an entire message
await outputBuffer.FlushAsync(); 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
{ {
break; break;