From c9468cdf8eb925c6627a53dd98bba98bafbd1b5f Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 1 Nov 2002 17:22:23 +0000 Subject: [PATCH] moved signaling code --- src/ca/tcpiiu.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index 75083c644..9747ec2a6 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -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() //