Github user cshannon commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1925#discussion_r171924792 --- Diff: artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java --- @@ -641,13 +647,37 @@ public void fail(ActiveMQException me, String message) { } } try { - protocolManager.removeConnection(this.getConnectionInfo(), me); + if (this.getConnectionInfo() != null) { + protocolManager.removeConnection(this.getConnectionInfo(), me); + } } catch (InvalidClientIDException e) { ActiveMQServerLogger.LOGGER.warn("Couldn't close connection because invalid clientID", e); } shutdown(true); } + private void delayedStop(final int waitTime, final String reason, Throwable cause) { + if (waitTime > 0) { + try { + server.getExecutorFactory().getExecutor().execute(new Runnable() { + @Override + public void run() { + try { + Thread.sleep(waitTime); --- End diff -- I won't have time today but I will fix my patch and push it up first thing monday morning.
---