git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1038036 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bosanac Dejan 2010-11-23 10:20:29 +00:00
parent fd4e13634b
commit 32db9c5a93
1 changed files with 2 additions and 2 deletions

View File

@ -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) {