Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
5.12.0
-
None
-
None
Description
ActiveMQConnection starts a session task thread but doesnt close it if close() is called and the broker doesnt respond
try { if (isConnectionInfoSentToBroker) { // If we announced ourselves to the broker.. Try to let the broker // know that the connection is being shutdown. RemoveInfo removeCommand = info.createRemoveCommand(); removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId); try { doSyncSendPacket(removeCommand, closeTimeout); } catch (JMSException e) { if (e.getCause() instanceof RequestTimedOutIOException) { // expected } else { throw e; } } doAsyncSendPacket(new ShutdownInfo()); } } finally { // ensure we clean up this connection anyway even if previous send fail // which can happen if we lost the connection with the broker started.set(false); // TODO if we move the TaskRunnerFactory to the connection // factory // then we may need to call // factory.onConnectionClose(this); if (sessionTaskRunner != null) { sessionTaskRunner.shutdown(); } closed.set(true); closing.set(false); }
solves it
tested on 5.12.0 but 5.12.x has the same code so I guess it has the same issue