[#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:
Norman Maurer 2014-05-07 07:08:36 +02:00
parent 3080d14f25
commit 68083920a4

View File

@ -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);