Skip to content

Commit

Permalink
[SL-UP] Remove the ActiveSubscription flag when the ReadHandler is …
Browse files Browse the repository at this point in the history
…being destroyed (#134)
  • Loading branch information
mkardous-silabs authored Nov 27, 2024
1 parent c16843b commit 83d9db2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/ReadHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ uint16_t ReadHandler::GetPublisherSelectedIntervalLimit()

ReadHandler::ReadHandler(ManagementCallback & apCallback, Messaging::ExchangeContext * apExchangeContext,
InteractionType aInteractionType, Observer * observer, DataModel::Provider * apDataModel) :
mAttributePathExpandIterator(apDataModel, nullptr),
mExchangeCtx(*this), mManagementCallback(apCallback)
mAttributePathExpandIterator(apDataModel, nullptr), mExchangeCtx(*this), mManagementCallback(apCallback)
{
VerifyOrDie(apExchangeContext != nullptr);

Expand Down Expand Up @@ -152,6 +151,7 @@ ReadHandler::~ReadHandler()
auto * appCallback = mManagementCallback.GetAppCallback();
if (mFlags.Has(ReadHandlerFlags::ActiveSubscription) && appCallback)
{
mFlags.Clear(ReadHandlerFlags::ActiveSubscription);
appCallback->OnSubscriptionTerminated(*this);
}

Expand Down

0 comments on commit 83d9db2

Please sign in to comment.