[ https://issues.apache.org/jira/browse/AMQ-6051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15012299#comment-15012299 ]
Romain Manni-Bucau commented on AMQ-6051: ----------------------------------------- created https://github.com/apache/activemq/pull/157 > ActiveMQConnection leaking thread when resources are not well closed > -------------------------------------------------------------------- > > Key: AMQ-6051 > URL: https://issues.apache.org/jira/browse/AMQ-6051 > Project: ActiveMQ > Issue Type: Bug > Affects Versions: 5.12.0 > Reporter: Romain Manni-Bucau > > ActiveMQConnection starts a session task thread but doesnt close it if > close() is called and the broker doesnt respond > {code} > 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); > } > {code} > solves it > tested on 5.12.0 but 5.12.x has the same code so I guess it has the same issue -- This message was sent by Atlassian JIRA (v6.3.4#6332)