Skip to content

Commit

Permalink
Fix numRetries for subscription (#16199)
Browse files Browse the repository at this point in the history
-- clear the counter back to 0 on successful establishment of a subscription.
  • Loading branch information
yunhanw-google authored Mar 14, 2022
1 parent 7c5c705 commit dd784cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/ReadClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,11 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP

MoveToState(ClientState::SubscriptionActive);

if (mReadPrepareParams.mResubscribePolicy != nullptr)
{
mNumRetries = 0;
}

RefreshLivenessCheckTimer();

return CHIP_NO_ERROR;
Expand Down

0 comments on commit dd784cb

Please sign in to comment.