optimized flush and fixed tcp shutdown sequence
This commit is contained in:
+6
-9
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user