gtully commented on code in PR #4700: URL: https://github.com/apache/activemq-artemis/pull/4700#discussion_r1413660197
########## artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java: ########## @@ -779,11 +782,18 @@ private void doFail(ActiveMQException me, String message) { } try { if (this.getConnectionInfo() != null) { - protocolManager.removeConnection(this.getConnectionInfo(), me); + protocolManager.removeConnection(this.getConnectionInfo().getClientId(), this); } - } catch (InvalidClientIDException e) { - logger.warn("Couldn't close connection because invalid clientID", e); } finally { + try { + // doing the disconnect on the finally for extra caution. + // if removeConnection throws an exception of any kind, this should still happen + disconnect(false); + } catch (Throwable e) { + // it should never happen, but never say never + logger.warn("OpenWireConnection::disconnect failure", e); Review Comment: also here, I think, Throwable ignored and logger.debug. If this warn appears in a log, there is nothing a user can do. it will only be noise. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: gitbox-unsubscr...@activemq.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org