fixed bug that prevented the initialReconnectDelay value from being changed

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@356814 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2005-12-14 17:34:16 +00:00
parent f25cc68fb1
commit f1bbfd3201
1 changed files with 2 additions and 1 deletions

View File

@ -115,6 +115,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 {
reconnectDelay = initialReconnectDelay;
Iterator iter = connectList.iterator(); Iterator iter = connectList.iterator();
for (int i = 0; iter.hasNext() && connectedTransport == null && !disposed; i++) { for (int i = 0; iter.hasNext() && connectedTransport == null && !disposed; i++) {
URI uri = (URI) iter.next(); URI uri = (URI) iter.next();
@ -126,7 +127,7 @@ public class FailoverTransport implements CompositeTransport {
restoreTransport(t); restoreTransport(t);
} }
log.debug("Connection established"); log.debug("Connection established");
reconnectDelay = 10; reconnectDelay = initialReconnectDelay;
connectedTransportURI = uri; connectedTransportURI = uri;
connectedTransport = t; connectedTransport = t;
reconnectMutex.notifyAll(); reconnectMutex.notifyAll();