]> dxcluster.org Git - spider.git/blobdiff - perl/DXProt.pm
prevent self pinging
[spider.git] / perl / DXProt.pm
index 67f64b79064616092577d3cbabab6629a26cc7ca..486cfa95f6226f65422be3e09736c150bb7434ea 100644 (file)
@@ -130,6 +130,8 @@ sub start
        if (!$self->{outbound}) {
                $self->send(pc38()) if DXNode->get_all();
                $self->send(pc18());
+               # remove from outstanding connects queue
+               @main::outstanding_connects = grep {$_->{call} ne $call} @main::outstanding_connects;
        }
        $self->state('init');
        $self->pc50_t(time);
@@ -716,7 +718,7 @@ sub normal
                                                                if ($tochan) {
                                                                        $tochan->nopings(3); # pump up the timer
                                                                        push @{$tochan->pingtime}, $t;
-                                                                       shift @{$tochan->pingtime} if @{$tochan->pingtime} > 10;
+                                                                       shift @{$tochan->pingtime} if @{$tochan->pingtime} > 6;
                                                                        my $st;
                                                                        for (@{$tochan->pingtime}) {
                                                                                $st += $_;