Skip to content

Commit

Permalink
Set AttemptedBytesRead in AbstractSocketByteChannel
Browse files Browse the repository at this point in the history
  • Loading branch information
yyjdelete authored Feb 18, 2020
1 parent 47f5ec7 commit a5251ff
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public override void FinishRead(SocketChannelAsyncOperation operation)
do
{
byteBuf = allocHandle.Allocate(allocator);
//int writable = byteBuf.WritableBytes;
allocHandle.AttemptedBytesRead = byteBuf.WritableBytes;
allocHandle.LastBytesRead = ch.DoReadBytes(byteBuf);
if (allocHandle.LastBytesRead <= 0)
{
Expand Down Expand Up @@ -363,4 +363,4 @@ protected bool IncompleteWrite(bool scheduleAsync, SocketChannelAsyncOperation o
/// <returns>The number of bytes that were written from the buffer.</returns>
protected abstract int DoWriteBytes(IByteBuffer buf);
}
}
}

0 comments on commit a5251ff

Please sign in to comment.