Skip to content

Commit

Permalink
[ReadHandler] Subscription resumption fix (#28903)
Browse files Browse the repository at this point in the history
* Added callback to create a readhandler node on subscription resumption

* Moved the callback to OnSubscriptionEstablished to HandleDeviceConnected and added the flag setup and the appCallback there as well to make both path have the same behavior
  • Loading branch information
lpbeliveau-silabs authored and pull[bot] committed Nov 14, 2023
1 parent ad28dfc commit 5271361
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/ReadHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -899,6 +899,16 @@ void ReadHandler::HandleDeviceConnected(void * context, Messaging::ExchangeManag

_this->mSessionHandle.Grab(sessionHandle);

_this->SetStateFlag(ReadHandlerFlags::ActiveSubscription);

auto * appCallback = _this->mManagementCallback.GetAppCallback();
if (appCallback)
{
appCallback->OnSubscriptionEstablished(*_this);
}
// Notify the observer that a subscription has been resumed
_this->mObserver->OnSubscriptionEstablished(_this);

_this->MoveToState(HandlerState::CanStartReporting);

ObjectList<AttributePathParams> * attributePath = _this->mpAttributePathList;
Expand Down

0 comments on commit 5271361

Please sign in to comment.