Skip to content

Commit

Permalink
ARTEMIS-4577 Send CONNECTION_CLOSED event after deleting temporary re…
Browse files Browse the repository at this point in the history
…sources
  • Loading branch information
brusdev committed Jan 22, 2024
1 parent eb7d131 commit fe5afc1
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -586,18 +586,6 @@ public void close() throws JMSException {

closed = true;

synchronized (sessions) {
for (Iterator<ActiveMQRASession> i = sessions.iterator(); i.hasNext(); ) {
ActiveMQRASession session = i.next();
try {
session.closeSession();
} catch (Throwable t) {
logger.trace("Error closing session", t);
}
i.remove();
}
}

synchronized (tempQueues) {
for (Iterator<TemporaryQueue> i = tempQueues.iterator(); i.hasNext(); ) {
TemporaryQueue temp = i.next();
Expand All @@ -623,6 +611,18 @@ public void close() throws JMSException {
i.remove();
}
}

synchronized (sessions) {
for (Iterator<ActiveMQRASession> i = sessions.iterator(); i.hasNext(); ) {
ActiveMQRASession session = i.next();
try {
session.closeSession();
} catch (Throwable t) {
logger.trace("Error closing session", t);
}
i.remove();
}
}
}

/**
Expand Down

0 comments on commit fe5afc1

Please sign in to comment.