diff options
author | Adam <Adam@anope.org> | 2013-12-19 07:31:49 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2013-12-19 07:32:46 -0500 |
commit | c4d4107412554bd0bdebb1285ff4a8c5613175f4 (patch) | |
tree | 81d1dbe23cbd39cc0f4e908c7c15f4caa0011c20 /src/servers.cpp | |
parent | ae5da1138980b1f1e370b81942d53254dab2b821 (diff) |
Channel::Sync can delete the channel, so safely iterate them when syncing from a server burst
Diffstat (limited to 'src/servers.cpp')
-rw-r--r-- | src/servers.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/servers.cpp b/src/servers.cpp index 46e1a7077..e70ce8641 100644 --- a/src/servers.cpp +++ b/src/servers.cpp @@ -269,9 +269,11 @@ void Server::Sync(bool sync_links) FOREACH_MOD(OnPreUplinkSync, (this)); } - for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it) + for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end;) { Channel *c = it->second; + ++it; + if (c->syncing) c->Sync(); } |