fixed proper shutdown of local CA subscriptions
This commit is contained in:
@@ -72,6 +72,7 @@ public:
|
||||
dbSubscriptionIO ( dbServiceIO &, dbChannelIO &, struct dbAddr &, cacStateNotify &,
|
||||
unsigned type, unsigned long count, unsigned mask, cacChannel::ioid * );
|
||||
void destroy ();
|
||||
void channelDestroyException ();
|
||||
void show ( unsigned level ) const;
|
||||
void * operator new ( size_t size );
|
||||
void operator delete ( void *pCadaver, size_t size );
|
||||
|
||||
@@ -263,6 +263,9 @@ void dbServiceIO::destroyAllIO ( dbChannelIO & chan )
|
||||
}
|
||||
}
|
||||
while ( ( pIO = tmp.get() ) ) {
|
||||
// If they call ioCancel() here it will be ignored
|
||||
// because the IO has been unregistered above
|
||||
pIO->channelDestroyException ();
|
||||
pIO->destroy ();
|
||||
}
|
||||
if ( chan.dbServicePrivateListOfIO::pBlocker ) {
|
||||
|
||||
@@ -57,8 +57,6 @@ dbSubscriptionIO::~dbSubscriptionIO ()
|
||||
if ( this->es ) {
|
||||
db_cancel_event ( this->es );
|
||||
}
|
||||
this->notify.exception ( ECA_CHANDESTROY,
|
||||
this->chan.pName(), this->type, this->count );
|
||||
}
|
||||
|
||||
void dbSubscriptionIO::destroy ()
|
||||
@@ -66,6 +64,12 @@ void dbSubscriptionIO::destroy ()
|
||||
delete this;
|
||||
}
|
||||
|
||||
void dbSubscriptionIO::channelDestroyException ()
|
||||
{
|
||||
this->notify.exception ( ECA_CHANDESTROY,
|
||||
this->chan.pName(), this->type, this->count );
|
||||
}
|
||||
|
||||
void * dbSubscriptionIO::operator new ( size_t size )
|
||||
{
|
||||
epicsAutoMutex locker ( dbSubscriptionIO::freeListMutex );
|
||||
|
||||
Reference in New Issue
Block a user