summaryrefslogtreecommitdiff
path: root/src/servers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/servers.cpp')
-rw-r--r--src/servers.cpp4
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();
}