From b81ac35b37a0c8a33b6874773cfddfa23035e926 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Wed, 17 Feb 2021 13:16:03 +0100 Subject: [PATCH] update internal ping every second while syncing --- src/TPPSMonitor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/TPPSMonitor.cpp b/src/TPPSMonitor.cpp index e817fbf..8cafd6f 100644 --- a/src/TPPSMonitor.cpp +++ b/src/TPPSMonitor.cpp @@ -37,8 +37,10 @@ void TPPSMonitor::operator()() { V += c->GetCarCount(); } // kick on "no ping" - if (c->SecondsSinceLastPing() > 10) { + if (c->SecondsSinceLastPing() > 10 && c->IsSynced()) { TimedOutClients.push_back(c); + } else if (!c->IsSynced()) { + c->UpdatePingTime(); } } return true;