[#2469] Correctly update indices after incomplete gathering write
Motivation: When doing a gathering write we need to update the indices after the write partial completes. In the current code-base we use the wrong value when compare the expected written bytes and the actual written bytes. Modifications: Use the correct value when compare. Result: Indices are updated correctly and so no corruption can happen when resume writing after data was only partial written before.
This commit is contained in:
parent
1a22186645
commit
c5e4c2294e
@ -171,7 +171,7 @@ public final class EpollSocketChannel extends AbstractEpollChannel implements So
|
||||
NioSocketChannelOutboundBuffer in, int msgCount, ByteBuffer[] nioBuffers) throws IOException {
|
||||
|
||||
int nioBufferCnt = in.nioBufferCount();
|
||||
long expectedWrittenBytes = in.nioBufferCount();
|
||||
long expectedWrittenBytes = in.nioBufferSize();
|
||||
|
||||
long localWrittenBytes = Native.writev(fd, nioBuffers, 0, nioBufferCnt);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user