diff options
| author | 2014-07-27 18:59:43 +0200 | |
|---|---|---|
| committer | 2014-07-27 18:59:43 +0200 | |
| commit | c1fa07d2eb6146a9e3f6c26f478a22b119032d27 (patch) | |
| tree | cc3bb95c8419b527f7efb36f52c93d490e5b60be /src/modules/m_spanningtree/treeserver.cpp | |
| parent | m_spanningtree Parse additional information present in SERVER messages (diff) | |
m_spanningtree Sync bursting state of servers in SERVER
Also send the time when they started bursting
Diffstat (limited to 'src/modules/m_spanningtree/treeserver.cpp')
| -rw-r--r-- | src/modules/m_spanningtree/treeserver.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 8ff4cbe7b..3a7d8c4a9 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -114,8 +114,10 @@ TreeServer::TreeServer(const std::string& Name, const std::string& Desc, const s void TreeServer::BeginBurst(unsigned long startms) { - if (!startms) - startms = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000); + unsigned long now = ServerInstance->Time() * 1000 + (ServerInstance->Time_ns() / 1000000); + // If the start time is in the future (clocks are not synced) then use current time + if ((!startms) || (startms > now)) + startms = now; this->StartBurst = startms; ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "Server %s started bursting at time %lu", sid.c_str(), startms); } |
