summaryrefslogtreecommitdiffstats
path: root/src/server/events/DisconnectAll.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events/DisconnectAll.cpp')
-rw-r--r--src/server/events/DisconnectAll.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/events/DisconnectAll.cpp b/src/server/events/DisconnectAll.cpp
index dd694810..23db5167 100644
--- a/src/server/events/DisconnectAll.cpp
+++ b/src/server/events/DisconnectAll.cpp
@@ -129,8 +129,11 @@ DisconnectAll::pre_process()
}
for (Patch::Connections::const_iterator i = _parent->connections().begin();
- i != _parent->connections().end(); ++i) {
+ i != _parent->connections().end();) {
+ Patch::Connections::const_iterator next = i;
+ ++next;
maybe_remove_connection((ConnectionImpl*)i->second.get());
+ i = next;
}
if (!_deleting && _parent->enabled())