File tree 1 file changed +15
-5
lines changed
1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -484,14 +484,24 @@ CHIP_ERROR ReadClient::GenerateDataVersionFilterList(DataVersionFilterIBs::Build
484
484
485
485
void ReadClient::OnActiveModeNotification ()
486
486
{
487
- // This function just tries to complete the deferred resubscription logic in `OnLivenessTimeoutCallback`.
488
487
VerifyOrDie (mpImEngine->InActiveReadClientList (this ));
489
- // If we are not in InactiveICDSubscription state, that means the liveness timeout has not been reached. Simply do nothing.
490
- VerifyOrReturn (IsInactiveICDSubscription ());
491
-
492
488
// When we reach here, the subscription definitely exceeded the liveness timeout. Just continue the unfinished resubscription
493
489
// logic in `OnLivenessTimeoutCallback`.
494
- TriggerResubscriptionForLivenessTimeout (CHIP_ERROR_TIMEOUT);
490
+ if (IsInactiveICDSubscription ())
491
+ {
492
+ TriggerResubscriptionForLivenessTimeout (CHIP_ERROR_TIMEOUT);
493
+ return ;
494
+ }
495
+
496
+ if (mIsResubscriptionScheduled )
497
+ {
498
+ // If a subscription fails and resubscription is scheduled, a check-in message should cancel
499
+ // the pending resubscription and initiate a new subscription immediately."
500
+ mNumRetries = 0 ;
501
+ CancelResubscribeTimer ();
502
+ TriggerResubscriptionForLivenessTimeout (CHIP_ERROR_TIMEOUT);
503
+ }
504
+ return ;
495
505
}
496
506
497
507
void ReadClient::OnPeerTypeChange (PeerType aType)
You can’t perform that action at this time.
0 commit comments