X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXProt.pm;h=201013a0c1bd034b9e7abcbac159756dd7a8031e;hb=8db1b590ed9b6b260fb4d437c120cccdd08bbb4d;hp=d6ea691796e82c3078f04d8aa1c41cc6e4c50b5e;hpb=874ee7e39c3d38f5b52226ced9486af33a7505c4;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index d6ea6917..201013a0 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1044,9 +1044,8 @@ sub normal shift @{$tochan->{pingtime}} if @{$tochan->{pingtime}} > 6; # cope with a missed ping, this means you must set the pingint large enough - my $miss = ($nopings-$tochan->{nopings}+1) * $tochan->{pingint}; - if ($tochan->is_arcluster && $miss > 0 && $t > $miss && $t < $miss + $tochan->{nopings} ) { - $t -= $miss; + if ($tochan->is_arcluster && $t > $tochan->{pingint} && $t < 2 * $tochan->{pingint} ) { + $t -= $tochan->{pingint}; } # calc smoothed RTT a la TCP @@ -1917,12 +1916,13 @@ sub in_filter_route sub eph_dup { my $s = shift; + my $r; # chop the end off $s =~ s/\^H\d\d?\^?\~?$//; - return 1 if exists $eph{$s}; + $r = 1 if exists $eph{$s}; # pump up the dup if it keeps circulating $eph{$s} = $main::systime; - return undef; + return $r; } sub eph_del_regex @@ -1941,7 +1941,7 @@ sub eph_clean my ($key, $val); while (($key, $val) = each %eph) { - if ($main::systime - $val > 90) { + if ($main::systime - $val > 180) { delete $eph{$key}; } }