diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-05-22 18:49:20 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-05-22 18:49:20 +0200 |
commit | df9bd50866a1ee95db78b88090aae74e245ad469 (patch) | |
tree | 7a935c76f218d5b1fd46b130febe0990760e92f8 /src/usermanager.cpp | |
parent | f449c6b2f06624b3af524c06179a0be591c496ab (diff) |
Fix some oversights
Diffstat (limited to 'src/usermanager.cpp')
-rw-r--r-- | src/usermanager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index 4ebc3b583..3e5fee3fc 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -320,9 +320,11 @@ void UserManager::DoBackgroundUserStuff() /* * loop over all local users.. */ - for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ++i) + for (LocalList::iterator i = local_users.begin(); i != local_users.end(); ) { + // It's possible that we quit the user below due to ping timeout etc. and QuitUser() removes it from the list LocalUser* curr = *i; + ++i; if (curr->CommandFloodPenalty || curr->eh.getSendQSize()) { |