optimized flush and fixed tcp shutdown sequence

This commit is contained in:
Jeff Hill
2002-05-14 22:46:43 +00:00
parent 8f306ef992
commit 43911f857a
+6 -9
View File
@@ -267,20 +267,13 @@ void tcpRecvThread::run ()
this->iiu.connect ();
this->iiu.sendThread.start ();
if ( this->iiu.state != tcpiiu::iiucs_connected ) {
this->iiu.cacRef.initiateAbortShutdown ( this->iiu );
this->thread.exitWaitRelease ();
this->iiu.cacRef.uninstallIIU ( this->iiu );
delete & this->iiu;
return;
}
this->iiu.sendThread.start ();
comBuf * pComBuf = new comBuf;
while ( this->iiu.state == tcpiiu::iiucs_connected ||
this->iiu.state == tcpiiu::iiucs_clean_shutdown ) {
@@ -1111,6 +1104,10 @@ void tcpiiu::subscriptionCancelRequest ( epicsGuard < cacMutex > &,
bool tcpiiu::flush ()
{
if ( this->sendQue.occupiedBytes() == 0 ) {
return true;
}
while ( true ) {
comBuf * pBuf;