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
This commit is contained in:
Clebert Suconic 2020-11-02 11:16:36 -05:00
parent a2d6d1d89d
commit fa4064cfd7

View File

@ -524,15 +524,18 @@ public class AMQPBrokerConnection implements ClientConnectionLifeCycleListener,
// keeping a single executor thread to this purpose would simplify things // keeping a single executor thread to this purpose would simplify things
connectExecutor.execute(() -> { connectExecutor.execute(() -> {
if (connecting) { 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; return;
} }
connecting = true; connecting = true;
try { try {
if (connection != null) { if (protonRemotingConnection != null) {
connection.close(); protonRemotingConnection.destroy();
connection = null; connection = null;
protonRemotingConnection = null;
} }
} catch (Throwable e) { } catch (Throwable e) {
logger.warn(e.getMessage(), e); logger.warn(e.getMessage(), e);