From d24c66f83d8a4a2b52eeabee2a3773642e00ac46 Mon Sep 17 00:00:00 2001 From: Jeff Hill Date: Fri, 11 Sep 2009 00:49:02 +0000 Subject: [PATCH] fix for mantis 366 --- src/ca/tcpiiu.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ca/tcpiiu.cpp b/src/ca/tcpiiu.cpp index 507558969..1592b38f7 100644 --- a/src/ca/tcpiiu.cpp +++ b/src/ca/tcpiiu.cpp @@ -582,17 +582,23 @@ void tcpRecvThread::run () "CA client library tcp receive thread " "terminating due to no space in pool " "C++ exception\n" ); + epicsGuard < epicsMutex > guard ( this->iiu.mutex ); + this->iiu.initiateCleanShutdown ( guard ); } catch ( std::exception & except ) { errlogPrintf ( "CA client library tcp receive thread " "terminating due to C++ exception \"%s\"\n", except.what () ); + epicsGuard < epicsMutex > guard ( this->iiu.mutex ); + this->iiu.initiateCleanShutdown ( guard ); } catch ( ... ) { errlogPrintf ( "CA client library tcp receive thread " - "terminating due to a C++ exception\n" ); + "terminating due to a non-standard C++ exception\n" ); + epicsGuard < epicsMutex > guard ( this->iiu.mutex ); + this->iiu.initiateCleanShutdown ( guard ); } }