ARTEMIS-179 Do not reconnect bridge on DISCONNECT
Note: this breaks scale-down because the bindings are removed.
This commit is contained in:
parent
f3be78a096
commit
682cad63f3
|
@ -587,8 +587,7 @@ public class BridgeImpl implements Bridge, SessionFailureListener, SendAcknowled
|
|||
else {
|
||||
ActiveMQServerLogger.LOGGER.debug("Received invalid scaleDownTargetNodeID: " + scaleDownTargetNodeID);
|
||||
|
||||
//we never fail permanently here, this only happens once all reconnect tries have happened
|
||||
fail(false);
|
||||
fail(me.getType() == ActiveMQExceptionType.DISCONNECTED);
|
||||
}
|
||||
|
||||
tryScheduleRetryReconnect(me.getType());
|
||||
|
|
|
@ -340,7 +340,9 @@ public class ClusterConnectionBridge extends BridgeImpl {
|
|||
|
||||
@Override
|
||||
protected void tryScheduleRetryReconnect(final ActiveMQExceptionType type) {
|
||||
scheduleRetryConnect();
|
||||
if (type != ActiveMQExceptionType.DISCONNECTED) {
|
||||
scheduleRetryConnect();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1428,7 +1428,9 @@ public final class ClusterConnectionImpl implements ClusterConnection, AfterConn
|
|||
ActiveMQServerLogger.LOGGER.debug("Removing record for: " + targetNodeID);
|
||||
MessageFlowRecord record = records.remove(targetNodeID);
|
||||
try {
|
||||
record.close();
|
||||
if (record != null) {
|
||||
record.close();
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
Loading…
Reference in New Issue