[
https://issues.apache.org/jira/browse/QPIDJMS-530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17310765#comment-17310765
]
ASF subversion and git services commented on QPIDJMS-530:
---------------------------------------------------------
Commit 7046c7d37c951b07684d3c9bade5e3191c5fc60f in qpid-jms's branch
refs/heads/main from Timothy Bish
[ https://gitbox.apache.org/repos/asf?p=qpid-jms.git;h=7046c7d ]
QPIDJMS-530 Add null check when dealing with consumer remote close
Possible race on concurrent close from local and remote can lead to NPE
during remote close handling as consumer might have already removed
itself from tracking at the session lvel.
> Potential NPE in JmsSession consumerClosed()
> --------------------------------------------
>
> Key: QPIDJMS-530
> URL: https://issues.apache.org/jira/browse/QPIDJMS-530
> Project: Qpid JMS
> Issue Type: Bug
> Affects Versions: 0.56.0
> Reporter: David Martin
> Assignee: Timothy A. Bish
> Priority: Major
>
> In the following code (JMSSession line 416), if consumer is null this throws
> a NPE and the consumer never recovers:
> {noformat}
> JmsMessageConsumer consumer = consumers.get(resource.getId());
> if (consumer.hasMessageListener()) {
> connection.onAsyncException(JmsExceptionSupport.create(cause));
> }
> try {
> if (consumer != null) {
> consumer.shutdown(cause);
> }
> {noformat}
> Happy to raise a PR myself for this (just ask) but I have had to fix it
> locally.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]