Commit 320162f1 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fix NPE when closing a CM connection. JM-881

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5849 b35dd754-fafc-0310-a699-88a17e54d16e
parent 97f8b9ce
...@@ -1535,12 +1535,14 @@ public class SessionManager extends BasicModule { ...@@ -1535,12 +1535,14 @@ public class SessionManager extends BasicModule {
// Remove all the hostnames that were registered for this server session // Remove all the hostnames that were registered for this server session
String domain = session.getAddress().getDomain(); String domain = session.getAddress().getDomain();
List<ConnectionMultiplexerSession> sessions = connnectionManagerSessions.get(domain); List<ConnectionMultiplexerSession> sessions = connnectionManagerSessions.get(domain);
sessions.remove(session); if (sessions != null) {
if (sessions.isEmpty()) { sessions.remove(session);
connnectionManagerSessions.remove(domain); if (sessions.isEmpty()) {
// Terminate ClientSessions originated from this connection manager connnectionManagerSessions.remove(domain);
// that are still active since the connection manager has gone down // Terminate ClientSessions originated from this connection manager
ConnectionMultiplexerManager.getInstance().multiplexerUnavailable(domain); // that are still active since the connection manager has gone down
ConnectionMultiplexerManager.getInstance().multiplexerUnavailable(domain);
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment