mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-134 fix the cause of most broken tests, most of the issues were do to my recent silly mistake in TCPReplicator.
This commit is contained in:
@@ -424,16 +424,9 @@ class TcpReplicator extends AbstractChannelReplicator implements Closeable {
|
||||
final IdentifierListener identifierListener = replicationConfig.identifierListener;
|
||||
final SocketAddress remoteAddress = socketChannel.getRemoteAddress();
|
||||
|
||||
boolean identifierIsUnique;
|
||||
|
||||
if (identifierListener != null) {
|
||||
identifierIsUnique = identifierListener.isIdentifierUnique(remoteIdentifier, remoteAddress);
|
||||
} else {
|
||||
identifierIsUnique = remoteIdentifier != localIdentifier;
|
||||
}
|
||||
|
||||
if (identifierIsUnique) {
|
||||
|
||||
if ( (identifierListener != null && !identifierListener.isIdentifierUnique(remoteIdentifier,
|
||||
remoteAddress)) || remoteIdentifier == localIdentifier)
|
||||
|
||||
// throwing this exception will cause us to disconnect, both the client and server
|
||||
// will be able to detect the the remote and local identifiers are the same,
|
||||
@@ -441,7 +434,6 @@ class TcpReplicator extends AbstractChannelReplicator implements Closeable {
|
||||
// methods
|
||||
throw new IllegalStateException("dropping connection, " +
|
||||
"as the remote-identifier is already being used, identifier=" + remoteIdentifier);
|
||||
}
|
||||
|
||||
attached.remoteModificationIterator = replica.acquireModificationIterator(remoteIdentifier,
|
||||
attached);
|
||||
|
||||
Reference in New Issue
Block a user