mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-134 better handling of toString() and close() of the TCP connections
This commit is contained in:
@@ -996,7 +996,11 @@ class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable {
|
||||
private Bytes receive(int requiredNumberOfBytes, long timeoutTime) throws IOException {
|
||||
|
||||
while (bytes.buffer().position() < requiredNumberOfBytes) {
|
||||
clientChannel.read(bytes.buffer());
|
||||
int len = clientChannel.read(bytes.buffer());
|
||||
|
||||
if (len == -1)
|
||||
throw new IORuntimeException("Disconnected to remote server");
|
||||
|
||||
checkTimeout(timeoutTime);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user