Skip to content

Commit 31bad3f

Browse files
tabish121brusdev
authored andcommitted
ARTEMIS-5697 Close down the proton transport on sasl client failures
When the SASL failure occurs from an outgoing broker connection attempt close down the transport and detach from the SASL client listener to avoid a loop.
1 parent 43336b3 commit 31bad3f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler

artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/handler/ProtonHandler.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,8 @@ public void onSaslMechanisms(Sasl sasl, Transport transport) {
463463
if (clientSASLMechanism == null) {
464464
logger.info("Outbound connection failed - unknown mechanism, offered mechanisms: {}",
465465
Arrays.asList(sasl.getRemoteMechanisms()));
466+
sasl.setListener(null);
467+
transport.close_head();
466468
dispatchAuthFailed();
467469
} else {
468470
sasl.setMechanisms(clientSASLMechanism.getName());

0 commit comments

Comments
 (0)