mirror of
https://github.com/corda/corda.git
synced 2025-01-03 19:54:13 +00:00
Fix another off-by-one error when EOS is hit on the socket
This commit is contained in:
parent
35a96a0d36
commit
9368dd2acc
@ -58,7 +58,9 @@ public class SocketChannel extends SelectableChannel
|
|||||||
natThrowWriteError(socket);
|
natThrowWriteError(socket);
|
||||||
}
|
}
|
||||||
int w = natWrite(socket, b.array(), b.arrayOffset() + b.position(), b.remaining());
|
int w = natWrite(socket, b.array(), b.arrayOffset() + b.position(), b.remaining());
|
||||||
b.position(b.position() + w);
|
if (w > 0) {
|
||||||
|
b.position(b.position() + w);
|
||||||
|
}
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user