gtully commented on code in PR #4700: URL: https://github.com/apache/activemq-artemis/pull/4700#discussion_r1413668116
########## artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java: ########## @@ -1817,14 +1804,18 @@ public Response processRecoverTransactions(TransactionInfo info) throws Exceptio @Override public Response processRemoveConnection(ConnectionId id, long lastDeliveredSequenceId) throws Exception { //we let protocol manager to handle connection add/remove - try { - for (SessionState sessionState : state.getSessionStates()) { - propagateLastSequenceId(sessionState, lastDeliveredSequenceId); - } - protocolManager.removeConnection(state.getInfo(), null); - } catch (Throwable e) { - // log + for (SessionState sessionState : state.getSessionStates()) { + propagateLastSequenceId(sessionState, lastDeliveredSequenceId); + } + if (state.getInfo() == null || state.getInfo().getClientId() == null) { + // I don't know how we could get to this state, I think it's impossible Review Comment: this is just some sensible defensive programming, I would drop the comment. for me it is debatable as to whether there is any value in a warn, possibly debug. What could a user do in this case? And what is the problem, we have not state to whack! -- 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