diff options
author | Attila Molnar <attilamolnar@hush.com> | 2015-05-17 18:00:42 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2015-05-17 18:00:42 +0200 |
commit | b28782c4a3cd52587d61541bcca4e0b217685c54 (patch) | |
tree | 6e2a88b2907821a2ab3c964e582a35cd54066983 /src/inspircd.cpp | |
parent | c1757d9126eb387d7ae0b558dabcad6490f25883 (diff) |
Fix incorrect iterator use leading to prematurely exiting loops when quitting users while looping the local user list
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index cb2b5db9d..5dfcca6d9 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -110,8 +110,8 @@ void InspIRCd::Cleanup() /* Close all client sockets, or the new process inherits them */ const UserManager::LocalList& list = Users.GetLocalUsers(); - for (UserManager::LocalList::const_iterator i = list.begin(); i != list.end(); ++i) - Users->QuitUser(*i, "Server shutdown"); + while (!list.empty()) + Users->QuitUser(list.front(), "Server shutdown"); GlobalCulls.Apply(); Modules->UnloadAll(); |