mirror of https://github.com/apache/activemq.git
Minor update: Check for null first before using the object.
git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@453629 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f8485e3b36
commit
ff7bee0e49
|
@ -581,12 +581,12 @@ public abstract class AbstractConnection implements Service, Connection, Task, C
|
|||
|
||||
ConnectionState cs = lookupConnectionState(connectionId);
|
||||
SessionState session = cs.getSessionState(id);
|
||||
|
||||
// Don't let new consumers or producers get added while we are closing this down.
|
||||
session.shutdown();
|
||||
|
||||
|
||||
if( session == null )
|
||||
throw new IllegalStateException("Cannot remove session that had not been registered: "+id);
|
||||
|
||||
// Don't let new consumers or producers get added while we are closing this down.
|
||||
session.shutdown();
|
||||
|
||||
// Cascade the connection stop to the consumers and producers.
|
||||
for (Iterator iter = session.getConsumerIds().iterator(); iter.hasNext();) {
|
||||
|
|
Loading…
Reference in New Issue