moved signaling code

This commit is contained in:
Jeff Hill
2002-11-01 17:22:23 +00:00
parent e29727f600
commit c9468cdf8e
+8 -8
View File
@@ -663,6 +663,14 @@ void tcpiiu::initiateAbortShutdown ( epicsGuard < callbackMutex > & cbGuard,
SOCKERRSTR (SOCKERRNO) );
}
//
// on HPUX close() and shutdown() are not enough so we must also
// throw signals to interrupt the threads that may be in the
// send() and recv() system calls.
//
this->recvThread.interruptSocketRecv ();
this->sendThread.interruptSocketSend ();
// linux threads in recv() dont wakeup unless we also
// call shutdown ( close() by itself is not enough )
if ( oldState == iiucs_connected ) {
@@ -684,14 +692,6 @@ void tcpiiu::initiateAbortShutdown ( epicsGuard < callbackMutex > & cbGuard,
SOCKERRSTR (SOCKERRNO) );
}
//
// on HPUX close() and shutdown() are not enough so we must also
// throw signals to interrupt the threads that may be in the
// send() and recv() system calls.
//
this->recvThread.interruptSocketRecv ();
this->sendThread.interruptSocketSend ();
//
// wake up the send thread if it isnt blocking in send()
//