Nullpointer exception could occur is the session is being closed at the same time that an async exception is received since it would also close the session out at the same time.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@378014 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-02-15 14:57:46 +00:00
parent a8dfa1f41b
commit 6f99fe8271
1 changed files with 1 additions and 2 deletions

View File

@ -507,9 +507,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
connection.asyncSendPacket(info.createRemoveCommand());
}
}
public void dispose() throws JMSException {
synchronized public void dispose() throws JMSException {
if (!closed) {
for (Iterator iter = consumers.iterator(); iter.hasNext();) {