diff --git a/src/TPPSMonitor.cpp b/src/TPPSMonitor.cpp index 3fef0a0..b891a22 100644 --- a/src/TPPSMonitor.cpp +++ b/src/TPPSMonitor.cpp @@ -65,10 +65,13 @@ void TPPSMonitor::operator()() { V += c->GetCarCount(); } // kick on "no ping" - if (c->SecondsSinceLastPing() > (20 * 60)) { - beammp_debug("client " + std::string("(") + std::to_string(c->GetID()) + ")" + c->GetName() + " timing out: " + std::to_string(c->SecondsSinceLastPing()) + ", pps: " + Application::PPS()); + if (c->SecondsSinceLastPing() > (20 * 60) ){ + beammp_debugf("client {} ({}) timing out: {}", c->GetID(), c->GetName(), c->SecondsSinceLastPing()); TimedOutClients.push_back(c); - } + } else if (c->IsSynced() && c->SecondsSinceLastPing() > (1 * 60)) { + beammp_debugf("client {} ({}) timing out: {}", c->GetName(), c->GetID(), c->SecondsSinceLastPing()); + TimedOutClients.push_back(c); + } return true; });