X-Git-Url: http://gb7djk.dxcluster.net/gitweb/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=perl%2FDXProt.pm;h=f6a32cce44f9ef97be30adf9cac8008de470032a;hb=6be3e1147b774c96b9d35c4c835f913e9c5e0ffc;hp=023daa334e9e03b9545a0d0b0598d6f7adab700e;hpb=8a43bfdeacbbc78d0ff70df35528f78be39e7485;p=spider.git diff --git a/perl/DXProt.pm b/perl/DXProt.pm index 023daa33..f6a32cce 100644 --- a/perl/DXProt.pm +++ b/perl/DXProt.pm @@ -1044,16 +1044,15 @@ 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}) * $tochan->{pingint}; - if ($tochan->is_arcluster && $t > $miss && $t < $miss + $tochan->{nopings} ) { - $t -= $miss; + if ($t > $tochan->{pingint} && $t < 2 * $tochan->{pingint} ) { + $t -= $tochan->{pingint}; } # calc smoothed RTT a la TCP if (@{$tochan->{pingtime}} == 1) { $tochan->{pingave} = $t; } else { - $tochan->{pingave} = $tochan->{pingave} + (($t - $tochan->{pingave}) / 8); + $tochan->{pingave} = $tochan->{pingave} + (($t - $tochan->{pingave}) / 6); } # my $st; # for (@{$tochan->{pingtime}}) { @@ -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}; } }