mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-10-23 08:30:49 +00:00
attempt to fix mass timeout kick
This commit is contained in:
1 parent
1875c8832d
commit
e35d1b5457
2 files changed
+2
-3
No files matched your search
+1
-1
@@ -42,13 +42,13 @@ void TPPSMonitor::operator()() {
|
||||
}
|
||||
// kick on "no ping"
|
||||
if (c->SecondsSinceLastPing() > 10 && c->IsSynced() && !c->IsSyncing()) {
|
||||
debug("client " + std::string("(") + std::to_string(c->GetID()) + ")" + c->GetName() + " timing out: " + std::to_string(c->SecondsSinceLastPing()) + ", pps: " + Application::PPS());
|
||||
TimedOutClients.push_back(c);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
for (auto& ClientToKick : TimedOutClients) {
|
||||
debug("client " + std::string("(") + std::to_string(ClientToKick->GetID()) + ")" + ClientToKick->GetName() + " kicked due to timeout!");
|
||||
Network().ClientKick(*ClientToKick, "Timeout (no ping for >10 seconds)");
|
||||
}
|
||||
TimedOutClients.clear();
|
||||
|
||||
Reference in new issue
Block a user