cancel () watchdog when disconnecting and report correct disconnect

timer total interval
This commit is contained in:
Jeff Hill
2000-08-29 22:52:15 +00:00
parent 9a5b709a0a
commit 49da8ca043
+4 -4
View File
@@ -18,8 +18,7 @@ tcpRecvWatchdog::tcpRecvWatchdog
period ( periodIn ),
echoProtocolAccepted ( echoProtocolAcceptedIn ),
responsePending ( false ),
beaconAnomaly ( true ),
dead (true)
beaconAnomaly ( true )
{
}
@@ -30,10 +29,11 @@ tcpRecvWatchdog::~tcpRecvWatchdog ()
void tcpRecvWatchdog::expire ()
{
if ( this->responsePending ) {
this->cancel ();
char hostName[128];
this->hostName ( hostName, sizeof (hostName) );
ca_printf ( "CA server %s unresponsive for %g sec. Disconnecting.\n",
hostName, this->period );
hostName, this->period + CA_ECHO_TIMEOUT );
this->shutdown ();
}
else {
@@ -51,7 +51,7 @@ void tcpRecvWatchdog::destroy ()
bool tcpRecvWatchdog::again () const
{
return ( ! this->dead );
return true;
}
double tcpRecvWatchdog::delay () const