From a5251ff504f67677a3a34fe283fc86b2e9d656e8 Mon Sep 17 00:00:00 2001 From: SilverFox Date: Tue, 18 Feb 2020 10:37:24 +0800 Subject: [PATCH] Set AttemptedBytesRead in AbstractSocketByteChannel --- .../Channels/Sockets/AbstractSocketByteChannel.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs b/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs index a6b7654ba..f6a9c32ce 100644 --- a/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs +++ b/src/DotNetty.Transport/Channels/Sockets/AbstractSocketByteChannel.cs @@ -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) { @@ -363,4 +363,4 @@ protected bool IncompleteWrite(bool scheduleAsync, SocketChannelAsyncOperation o /// The number of bytes that were written from the buffer. protected abstract int DoWriteBytes(IByteBuffer buf); } -} \ No newline at end of file +}