diff --git a/src/ca/netSubscription.cpp b/src/ca/netSubscription.cpp index 5c315834c..9a29ac2b6 100644 --- a/src/ca/netSubscription.cpp +++ b/src/ca/netSubscription.cpp @@ -92,9 +92,9 @@ void netSubscription::exception ( this->subscribed = false; } if ( status == ECA_CHANDESTROY ) { + this->privateChanForIO.ioCompletionNotify ( guard, *this ); this->notify.exception ( guard, status, pContext, UINT_MAX, 0 ); - this->privateChanForIO.ioCompletionNotify ( guard, *this ); this->~netSubscription (); recycle.recycleSubscription ( guard, *this ); } @@ -116,9 +116,9 @@ void netSubscription::exception ( this->subscribed = false; } if ( status == ECA_CHANDESTROY ) { + this->privateChanForIO.ioCompletionNotify ( guard, *this ); this->notify.exception ( guard, status, pContext, UINT_MAX, 0 ); - this->privateChanForIO.ioCompletionNotify ( guard, *this ); this->~netSubscription (); recycle.recycleSubscription ( guard, *this ); } diff --git a/src/ca/netWriteNotifyIO.cpp b/src/ca/netWriteNotifyIO.cpp index b9465a67d..68d4992e7 100644 --- a/src/ca/netWriteNotifyIO.cpp +++ b/src/ca/netWriteNotifyIO.cpp @@ -64,8 +64,8 @@ void netWriteNotifyIO::completion ( epicsGuard < epicsMutex > & guard, cacRecycle & recycle ) { - this->notify.completion ( guard ); this->privateChanForIO.ioCompletionNotify ( guard, *this ); + this->notify.completion ( guard ); this->~netWriteNotifyIO (); recycle.recycleWriteNotifyIO ( guard, *this ); }