fix for mantis 153

This commit is contained in:
Jeff Hill
2005-11-09 23:55:15 +00:00
parent a6957a6ec1
commit f4aa9c2e33
2 changed files with 15 additions and 5 deletions

View File

@@ -1667,6 +1667,7 @@ void tcpiiu::eliminateExcessiveSendBacklog (
// or unresponsive circuit
if ( ! userRequestsCanBeAccepted ||
this->unresponsiveCircuit ) {
this->decrementBlockingForFlushCount ( mutualExclusionGuard );
throw cacChannel::notConnected ();
}
@@ -1681,11 +1682,7 @@ void tcpiiu::eliminateExcessiveSendBacklog (
this->flushBlockEvent.wait ( 30.0 );
}
}
assert ( this->blockingForFlush > 0u );
this->blockingForFlush--;
if ( this->blockingForFlush == 0 ) {
this->flushBlockEvent.signal ();
}
this->decrementBlockingForFlushCount ( mutualExclusionGuard );
}
}
else if ( ! this->earlyFlush && this->sendQue.flushEarlyThreshold(0u) ) {
@@ -1694,6 +1691,17 @@ void tcpiiu::eliminateExcessiveSendBacklog (
}
}
void tcpiiu::decrementBlockingForFlushCount (
epicsGuard < epicsMutex > & guard )
{
guard.assertIdenticalMutex ( this->mutex );
assert ( this->blockingForFlush > 0u );
this->blockingForFlush--;
if ( this->blockingForFlush == 0 ) {
this->flushBlockEvent.signal ();
}
}
osiSockAddr tcpiiu::getNetworkAddress (
epicsGuard < epicsMutex > & guard ) const
{

View File

@@ -253,6 +253,8 @@ private:
void disconnectNotify (
epicsGuard < epicsMutex > & );
bool bytesArePendingInOS () const;
void decrementBlockingForFlushCount (
epicsGuard < epicsMutex > & guard );
// send protocol stubs
void echoRequest (