From 069cd71aa3d7eef3400f75259e74e07b384ef28c Mon Sep 17 00:00:00 2001 From: HanzZ Date: Sun, 21 Aug 2011 23:01:16 +0200 Subject: [PATCH] Disconnect even invalid user, this can happen when password is valid, but session was not established yet --- src/userregistry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/userregistry.cpp b/src/userregistry.cpp index fc65f8a6..bfdb8faf 100644 --- a/src/userregistry.cpp +++ b/src/userregistry.cpp @@ -80,7 +80,6 @@ void UserRegistry::stopLogin(const Swift::JID& user, Swift::ServerFromClientSess if (users.find(key) != users.end()) { if (users[key].session == session) { LOG4CXX_INFO(logger, key << ": Stopping login process (user probably disconnected while logging in)"); - onDisconnectUser(user); users.erase(key); } else { @@ -90,6 +89,7 @@ void UserRegistry::stopLogin(const Swift::JID& user, Swift::ServerFromClientSess else { LOG4CXX_WARN(logger, key << ": Stopping login process (user probably disconnected while logging in) for invalid user"); } + onDisconnectUser(user); } void UserRegistry::onPasswordValid(const Swift::JID &user) {