mirror of https://github.com/apache/activemq.git
https://issues.apache.org/activemq/browse/AMQ-3049 - failover and initialReconnectDelay
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1038036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd4e13634b
commit
32db9c5a93
|
@ -99,7 +99,7 @@ public class FailoverTransport implements CompositeTransport {
|
||||||
private int maxReconnectAttempts;
|
private int maxReconnectAttempts;
|
||||||
private int startupMaxReconnectAttempts;
|
private int startupMaxReconnectAttempts;
|
||||||
private int connectFailures;
|
private int connectFailures;
|
||||||
private long reconnectDelay = this.initialReconnectDelay;
|
private long reconnectDelay = -1;
|
||||||
private Exception connectionFailure;
|
private Exception connectionFailure;
|
||||||
private boolean firstConnection = true;
|
private boolean firstConnection = true;
|
||||||
// optionally always have a backup created
|
// optionally always have a backup created
|
||||||
|
@ -805,7 +805,7 @@ public class FailoverTransport implements CompositeTransport {
|
||||||
if (connectList.isEmpty()) {
|
if (connectList.isEmpty()) {
|
||||||
failure = new IOException("No uris available to connect to.");
|
failure = new IOException("No uris available to connect to.");
|
||||||
} else {
|
} else {
|
||||||
if (!useExponentialBackOff) {
|
if (!useExponentialBackOff || reconnectDelay == -1) {
|
||||||
reconnectDelay = initialReconnectDelay;
|
reconnectDelay = initialReconnectDelay;
|
||||||
}
|
}
|
||||||
synchronized (backupMutex) {
|
synchronized (backupMutex) {
|
||||||
|
|
Loading…
Reference in New Issue