From fa4064cfd784e93a02a3905b16b8c9302fe105fc Mon Sep 17 00:00:00 2001 From: Clebert Suconic Date: Mon, 2 Nov 2020 11:16:36 -0500 Subject: [PATCH] ARTEMIS-2969 / ARTEMIS-2937 RedoConnection should call protonRemotingConnection.destroy Instead of calling destroy, redo was closing the Netty connection directly leaving the job of destroy delayed until TTL --- .../protocol/amqp/connect/AMQPBrokerConnection.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java index 1e6d52b4dc..b4b336d7a8 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/AMQPBrokerConnection.java @@ -524,15 +524,18 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener, // keeping a single executor thread to this purpose would simplify things connectExecutor.execute(() -> { if (connecting) { - logger.debug("Broker connection " + this.getName() + " was already in retry mode, exception or retry no captured"); + if (logger.isDebugEnabled()) { + logger.debug("Broker connection " + this.getName() + " was already in retry mode, exception or retry not captured"); + } return; } connecting = true; try { - if (connection != null) { - connection.close(); + if (protonRemotingConnection != null) { + protonRemotingConnection.destroy(); connection = null; + protonRemotingConnection = null; } } catch (Throwable e) { logger.warn(e.getMessage(), e);