mirror of https://github.com/apache/activemq.git
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@814639 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3720e847d1
commit
31ecfae934
|
@ -762,7 +762,15 @@ public class FailoverTransport implements CompositeTransport {
|
|||
}
|
||||
}
|
||||
}
|
||||
long reconnectAttempts = firstConnection ? this.startupMaxReconnectAttempts : this.maxReconnectAttempts;
|
||||
int reconnectAttempts = 0;
|
||||
if (firstConnection) {
|
||||
if (this.startupMaxReconnectAttempts != 0) {
|
||||
reconnectAttempts = this.startupMaxReconnectAttempts;
|
||||
}
|
||||
}
|
||||
if (reconnectAttempts==0) {
|
||||
reconnectAttempts = this.maxReconnectAttempts;
|
||||
}
|
||||
if (reconnectAttempts > 0 && ++connectFailures >= reconnectAttempts) {
|
||||
LOG.error("Failed to connect to transport after: " + connectFailures + " attempt(s)");
|
||||
connectionFailure = failure;
|
||||
|
|
Loading…
Reference in New Issue