From a3c0f616fb7c5972429480e2989213161fa8e1cb Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 11 Oct 2025 09:39:12 -0700 Subject: [PATCH] LagChecker: send another ping if no pong received after 15 minutes --- lib/PBot/Core/LagChecker.pm | 5 ++++- lib/PBot/VERSION.pm | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/PBot/Core/LagChecker.pm b/lib/PBot/Core/LagChecker.pm index ae628b6b..f46b7363 100644 --- a/lib/PBot/Core/LagChecker.pm +++ b/lib/PBot/Core/LagChecker.pm @@ -67,7 +67,10 @@ sub trigger_lag_history_interval($self, $section, $item, $newvalue) { sub send_ping($self) { return unless defined $self->{pbot}->{conn} && $self->{pbot}->{conn}->connected && $self->{welcomed}; - return if defined $self->{pong_received} && $self->{pong_received} == 0; + if (defined $self->{pong_received} && $self->{pong_received} == 0 + && gettimeofday - $self->{ping_send_time}[0] < 900) { + return; + } $self->{ping_send_time} = [gettimeofday]; $self->{pong_received} = 0; diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index 81e51ef2..77d35da3 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4904, - BUILD_DATE => "2025-10-08", + BUILD_REVISION => 4905, + BUILD_DATE => "2025-10-11", }; sub initialize {}