mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +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);
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user