get alternate pinging working properly at half pingint
[spider.git] / perl / DXXml / Ping.pm
index e02b61f85ca081a9fceb5fbf823c485d41621c2d..59c8ff3e6ee9067c0f16378b7660c82d820e08fd 100644 (file)
@@ -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});
                }