mirror of
https://github.com/pragma-/pbot.git
synced 2025-10-14 06:57:25 +02:00
LagChecker: send another ping if no pong received after 15 minutes
This commit is contained in:
parent
e035745860
commit
a3c0f616fb
@ -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;
|
||||
|
@ -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 {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user