diff --git a/src/messaging/Channel.cpp b/src/messaging/Channel.cpp index 540627c267fce2..777e631a870154 100644 --- a/src/messaging/Channel.cpp +++ b/src/messaging/Channel.cpp @@ -37,9 +37,10 @@ ExchangeContext * ChannelHandle::NewExchange(ExchangeDelegate * delegate) void ChannelHandle::Release() { - if (mAssociation == nullptr) - mAssociation = nullptr; + if (mAssociation == nullptr) return; + mAssociation->mChannelContext->mExchangeManager->ReleaseChannelHandle(mAssociation); + mAssociation = nullptr; } } // namespace Messaging