better fix for mantis 111

This commit is contained in:
Jeff Hill
2005-11-08 21:25:23 +00:00
parent d50d793467
commit 6f6f1d22cd
5 changed files with 101 additions and 97 deletions

View File

@@ -43,27 +43,29 @@ tcpSendWatchdog::~tcpSendWatchdog ()
epicsTimerNotify::expireStatus tcpSendWatchdog::expire (
const epicsTime & /* currentTime */ )
{
callbackManager mgr ( this->ctxNotify, this->cbMutex );
epicsGuard < epicsMutex > guard ( this->mutex );
if ( this->iiu.bytesArePendingInOS() ) {
this->iiu.printf ( mgr.cbGuard,
"The CA client library is disconnecting after a flush request "
"timed out, but receive data is pending, probably because of an "
"application schedualing problem\n" );
{
epicsGuard < epicsMutex > guard ( this->mutex );
if ( this->iiu.receiveThreadIsBusy ( guard ) ) {
return expireStatus ( restart, this->period );
}
}
{
callbackManager mgr ( this->ctxNotify, this->cbMutex );
epicsGuard < epicsMutex > guard ( this->mutex );
# ifdef DEBUG
char hostName[128];
this->iiu.getHostName ( guard, hostName, sizeof ( hostName ) );
debugPrintf ( ( "Request not accepted by CA server %s for %g sec. Disconnecting.\n",
hostName, this->period ) );
# endif
this->iiu.sendTimeoutNotify ( mgr, guard );
this->iiu.sendTimeoutNotify ( mgr, guard );
}
return noRestart;
}
void tcpSendWatchdog::start ( const epicsTime & currentTime )
void tcpSendWatchdog::start ( const epicsTime & /* currentTime */ )
{
this->timer.start ( *this, currentTime + this->period );
this->timer.start ( *this, this->period );
}
void tcpSendWatchdog::cancel ()