From: minima Date: Tue, 24 Jan 2006 12:20:51 +0000 (+0000) Subject: get alternate pinging working properly at half pingint X-Git-Tag: R_1_52~3 X-Git-Url: http://dxcluster.net/gitweb/gitweb.cgi?a=commitdiff_plain;h=caa1689fa47268bb655b16fb21e6531e50f5c3e8;p=spider.git get alternate pinging working properly at half pingint --- diff --git a/perl/DXXml.pm b/perl/DXXml.pm index 280d19ce..b9904101 100644 --- a/perl/DXXml.pm +++ b/perl/DXXml.pm @@ -156,7 +156,6 @@ sub process DXXml::Ping::add($main::me, $dxchan->call); $dxchan->{nopings} -= 1; $dxchan->{lastping} = $t; - $dxchan->{lastping} += $dxchan->{pingint} / 2 unless @{$dxchan->{pingtime}}; } } } diff --git a/perl/DXXml/Ping.pm b/perl/DXXml/Ping.pm index e02b61f8..59c8ff3e 100644 --- a/perl/DXXml/Ping.pm +++ b/perl/DXXml/Ping.pm @@ -38,6 +38,9 @@ sub handle_input ot=>$self->{t} ); $dxchan->send($rep->toxml); + if ($dxchan->{outgoing} && abs($dxchan->{lastping} - $main::systime) < 15) { + $dxchan->{lastping} += $dxchan->{pingint} / 2; + } } else { handle_ping_reply($dxchan, $self->{o}, $self->{ot}, $self->{oid}); }