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 {
// Remove all the hostnames that were registered for this server session
String domain = session.getAddress().getDomain();
List<ConnectionMultiplexerSession> sessions = connnectionManagerSessions.get(domain);
sessions.remove(session);
if (sessions.isEmpty()) {
connnectionManagerSessions.remove(domain);
// Terminate ClientSessions originated from this connection manager
// that are still active since the connection manager has gone down
ConnectionMultiplexerManager.getInstance().multiplexerUnavailable(domain);
if (sessions != null) {
sessions.remove(session);
if (sessions.isEmpty()) {
connnectionManagerSessions.remove(domain);
// Terminate ClientSessions originated from this connection manager
// 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