diff --git a/src/ca/udpiiu.cpp b/src/ca/udpiiu.cpp index 24865e78b..7103e464e 100644 --- a/src/ca/udpiiu.cpp +++ b/src/ca/udpiiu.cpp @@ -172,6 +172,12 @@ udpiiu::~udpiiu () { bool closeCompleted = false; + static limboiiu limboIIU; + while ( nciu * pChan = this->channelList.get () ) { + // no need to own CAC lock here because the channel is being decomissioned + pChan->disconnect ( limboIIU ); + } + this->shutdownCmd = true; this->wakeupMsg (); @@ -943,16 +949,6 @@ void udpiiu::beaconAnomalyNotify () } } -void udpiiu::removeAllChannels ( epicsGuard < callbackMutex > & ) -{ - epicsGuard < udpMutex > guard ( this->mutex ); - static limboiiu limboIIU; - while ( nciu * pChan = this->channelList.get () ) { - // no need to own CAC lock here because the channel is being decomissioned - pChan->disconnect ( limboIIU ); - } -} - bool udpiiu::searchMsg ( unsigned short retrySeqNumber, unsigned & retryNoForThisChannel ) { bool success; diff --git a/src/ca/udpiiu.h b/src/ca/udpiiu.h index 3ad144242..986b7d007 100644 --- a/src/ca/udpiiu.h +++ b/src/ca/udpiiu.h @@ -86,7 +86,6 @@ public: void notifySearchResponse ( unsigned short retrySeqNo, const epicsTime & currentTime ); void resetSearchTimerPeriod ( double delay ); void beaconAnomalyNotify (); - void removeAllChannels ( epicsGuard < callbackMutex > & cbGuard ); int printf ( const char *pformat, ... ); unsigned channelCount (); class tcpiiu * uninstallChanAndReturnDestroyPtr ( epicsGuard < cacMutex > &, nciu & );