get alternate pinging working properly at half pingint

This commit is contained in:
minima 2006-01-24 12:20:51 +00:00
parent 3911e74f91
commit 0dff8311e7
2 changed files with 3 additions and 1 deletions

View File

@ -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}};
}
}
}

View 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});
}