ARTEMIS-2969 / ARTEMIS-2937 should set connecting = false when maxRetry is reached

This commit is contained in:
Clebert Suconic 2020-11-02 13:13:11 -05:00
parent 16e8db3aeb
commit 7a435a944c
1 changed files with 1 additions and 0 deletions

View File

@ -303,6 +303,7 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
}
reconnectFuture = scheduledExecutorService.schedule(() -> connectExecutor.execute(() -> doConnect()), brokerConnectConfiguration.getRetryInterval(), TimeUnit.MILLISECONDS);
} else {
connecting = false;
ActiveMQAMQPProtocolLogger.LOGGER.retryConnectionFailed(brokerConnectConfiguration.getName(), host + ":" + port, retryCounter);
if (logger.isDebugEnabled()) {
logger.debug("no more reconnections as the retry counter reached " + retryCounter + " out of " + brokerConnectConfiguration.getReconnectAttempts());