From d859a43492e777d4f4c6dbd4ea746295430c83a9 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Wed, 23 Oct 2002 22:42:27 +0000 Subject: [PATCH] print warning message and dont disconnect if the client application is never reading its input - also dont reset the beaconAnomaly flag if we send data --- src/ca/tcpRecvWatchdog.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/ca/tcpRecvWatchdog.cpp b/src/ca/tcpRecvWatchdog.cpp index a47a30ed3..0c86def31 100644 --- a/src/ca/tcpRecvWatchdog.cpp +++ b/src/ca/tcpRecvWatchdog.cpp @@ -45,6 +45,11 @@ epicsTimerNotify::expireStatus tcpRecvWatchdog::expire ( const epicsTime & /* currentTime */ ) // X aCC 361 { if ( this->responsePending ) { + if ( this->iiu.bytesArePendingInOS() ) { + this->cacRef.printf ( +"Warning: non-preemptive CA client application has incoming messages pending, but it does not called ca_pend_event()\n" ); + return expireStatus ( restart, this->period ); + } this->cancel (); # ifdef DEBUG char hostName[128]; @@ -108,7 +113,10 @@ void tcpRecvWatchdog::messageArrivalNotify () // void tcpRecvWatchdog::sendBacklogProgressNotify () { - this->beaconAnomaly = false; + // We dont set "beaconAnomaly" to be false here because, after we see a + // beacon anomaly (which could be transiently detecting a reboot) we will + // not trust the beacon as an indicator of a healthy server until we + // receive at least one message from the server. this->responsePending = false; this->timer.start ( *this, this->period ); debugPrintf ( ("saw heavy send backlog - reseting TCP recv watchdog\n") );