From 49da8ca043238fd57db6fb466c90556817e60a59 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Tue, 29 Aug 2000 22:52:15 +0000 Subject: [PATCH] cancel () watchdog when disconnecting and report correct disconnect timer total interval --- src/ca/tcpRecvWatchdog.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ca/tcpRecvWatchdog.cpp b/src/ca/tcpRecvWatchdog.cpp index 00b703902..fd0965553 100644 --- a/src/ca/tcpRecvWatchdog.cpp +++ b/src/ca/tcpRecvWatchdog.cpp @@ -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