From 83d9db2ff4f82ff46f1ffeeaa2f59fd49e25b979 Mon Sep 17 00:00:00 2001 From: Mathieu Kardous <84793247+mkardous-silabs@users.noreply.github.com> Date: Wed, 27 Nov 2024 10:25:54 -0500 Subject: [PATCH] [SL-UP] Remove the `ActiveSubscription` flag when the ReadHandler is being destroyed (#134) --- src/app/ReadHandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 4794ead97e..7861dcc1d5 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -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); @@ -152,6 +151,7 @@ ReadHandler::~ReadHandler() auto * appCallback = mManagementCallback.GetAppCallback(); if (mFlags.Has(ReadHandlerFlags::ActiveSubscription) && appCallback) { + mFlags.Clear(ReadHandlerFlags::ActiveSubscription); appCallback->OnSubscriptionTerminated(*this); }