mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
possible fix to race codition reported by Ozan
This commit is contained in:
@@ -650,12 +650,11 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
|
||||
LOG.debug("handshaking for localIdentifier=" + localIdentifier + "," +
|
||||
"remoteIdentifier=" + remoteIdentifier);
|
||||
|
||||
long timeStampOfLastMessage = replica.lastModificationTime(remoteIdentifier);
|
||||
attached.remoteModificationIterator =
|
||||
replica.acquireModificationIterator(remoteIdentifier);
|
||||
|
||||
attached.remoteModificationIterator.setModificationNotifier(attached);
|
||||
|
||||
long timeStampOfLastMessage = replica.lastModificationTime(remoteIdentifier);
|
||||
writer.writeRemoteBootstrapTimestamp(timeStampOfLastMessage);
|
||||
|
||||
writer.writeServerVersion();
|
||||
@@ -756,6 +755,7 @@ final class TcpReplicator<K, V> extends AbstractChannelReplicator implements Clo
|
||||
entryWriter.entriesToBuffer(attached.remoteModificationIterator);
|
||||
|
||||
try {
|
||||
|
||||
final int len = entryWriter.writeBufferToSocket(socketChannel, approxTime);
|
||||
|
||||
if (len == -1)
|
||||
|
||||
Reference in New Issue
Block a user