From 32038046d5d3dc0074069d3f7795bf5c4edf94e5 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Wed, 17 Feb 2021 13:02:52 +0100 Subject: [PATCH] add print on ping --- src/TPPSMonitor.cpp | 1 + src/TServer.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/TPPSMonitor.cpp b/src/TPPSMonitor.cpp index eb42927..0251225 100644 --- a/src/TPPSMonitor.cpp +++ b/src/TPPSMonitor.cpp @@ -44,6 +44,7 @@ void TPPSMonitor::operator()() { for (auto& ClientToKick : TimedOutClients) { TCPServer().ClientKick(*ClientToKick, "Timeout (no ping for >10 seconds)"); } + TimedOutClients.clear(); if (C == 0 || mInternalPPS == 0) { Application::SetPPS("-"); } else { diff --git a/src/TServer.cpp b/src/TServer.cpp index 47a839c..e1a8bf0 100644 --- a/src/TServer.cpp +++ b/src/TServer.cpp @@ -95,6 +95,7 @@ void TServer::GlobalParser(std::weak_ptr Client, std::string Packet, TP TCPServer.Respond(*LockedClient, ("p"), false); TCPServer.UpdatePlayer(*LockedClient); LockedClient->UpdatePingTime(); + debug("ping received from " + LockedClient->GetName()); return; case 'O': if (Packet.length() > 1000) {