Commit 03e5d07a authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

1. Added sanity-check to #getBestRoute when shutting down server.

2. Added debug log when shutting down server.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@1319 b35dd754-fafc-0310-a699-88a17e54d16e
parent e816cc0a
......@@ -543,7 +543,7 @@ public class SessionManager extends BasicModule {
*/
public Session getBestRoute(JID recipient) {
// Return null if the JID belongs to a foreign server
if (!serverName.equals(recipient.getDomain())) {
if (serverName == null || !serverName.equals(recipient.getDomain())) {
return null;
}
ClientSession session = null;
......@@ -1147,6 +1147,7 @@ public class SessionManager extends BasicModule {
}
public void stop() {
Log.debug("Stopping server");
serverName = null;
if (JiveGlobals.getBooleanProperty("shutdownMessage.enabled")) {
sendServerMessage(null, LocaleUtils.getLocalizedString("admin.shutdown.now"));
......
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