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
1 changed files with 6 additions and 3 deletions

View File

@ -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);