Skip to content

Commit 1ad4bc7

Browse files
committed
修复网络统计功能没有统计接收字节数的BUG
1 parent 8ca577f commit 1ad4bc7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Quick.Protocol/QpChannel_Recv.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,12 @@ private async Task FillRecvPipeAsync(Stream stream, PipeWriter writer, Cancellat
414414
if (bytesRead == 0)
415415
break;
416416
writer.Advance(bytesRead);
417+
if (options.EnableNetstat)
418+
{
419+
BytesReceived += bytesRead;
420+
if (BytesReceived > LONG_HALF_MAX_VALUE)
421+
BytesReceived = 0;
422+
}
417423
await writer.FlushAsync(token);
418424
}
419425
}

0 commit comments

Comments
 (0)