Disconnect even invalid user, this can happen when password is valid, but session was not established yet

This commit is contained in:
HanzZ 2011-08-21 23:01:16 +02:00
parent 7b5810a410
commit 069cd71aa3

View file

@ -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) {