Skip to content

Commit

Permalink
[C++]: add reset of subscription and counter caches to onClose for #717.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontgomery committed Oct 12, 2019
1 parent f53d3b5 commit f9a9a64
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions aeron-client/src/main/cpp/ClientConductor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,11 @@ void ClientConductor::closeAllResources(long long nowMs)
CallbackGuard callbackGuard(m_isInCallback);
kv.second.m_onUnavailableImageHandler(image);
}

if (kv.second.m_subscriptionCache)
{
kv.second.m_subscriptionCache.reset();
}
}
}
m_subscriptionByRegistrationId.clear();
Expand All @@ -954,6 +959,11 @@ void ClientConductor::closeAllResources(long long nowMs)
CallbackGuard callbackGuard(m_isInCallback);
handler(m_countersReader, registrationId, counterId);
}

if (kv.second.m_counterCache)
{
kv.second.m_counterCache.reset();
}
}
}
m_counterByRegistrationId.clear();
Expand Down

0 comments on commit f9a9a64

Please sign in to comment.