Commit d8c71948 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed NPE when stopping the server while users are connected. JM-177


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@998 b35dd754-fafc-0310-a699-88a17e54d16e
parent 57c61c98
...@@ -607,8 +607,9 @@ public class SessionManager extends BasicModule { ...@@ -607,8 +607,9 @@ public class SessionManager extends BasicModule {
* @return the <code>Session</code> associated with the JID. * @return the <code>Session</code> associated with the JID.
*/ */
public ClientSession getSession(JID from) { public ClientSession getSession(JID from) {
// Return null if the JID is null or belongs to a foreign server // Return null if the JID is null or belongs to a foreign server. If the server is
if (from == null || !serverName.equals(from.getDomain())) { // shutting down then serverName will be null so answer null too in this case.
if (from == null || serverName == null || !serverName.equals(from.getDomain())) {
return null; return null;
} }
......
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