File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -486,11 +486,14 @@ void ReadClient::OnActiveModeNotification()
486
486
{
487
487
// This function just tries to complete the deferred resubscription logic in `OnLivenessTimeoutCallback`.
488
488
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 ());
489
+ // If we are in InactiveICDSubscription state, it means the liveness timeout has been reached.
490
+ // If we are in Idle state, it means subscription stuck in initialized state, and device cannot be reached
491
+ // If we are not in the above, simply do nothing.
492
+ // If we are in the above, we should trigger immediate resubscription.
493
+ VerifyOrReturn (IsInactiveICDSubscription () || IsIdle ());
491
494
492
- // When we reach here, the subscription definitely exceeded the liveness timeout. Just continue the unfinished resubscription
493
- // logic in `OnLivenessTimeoutCallback`.
495
+ mNumRetries = 0 ;
496
+ CancelResubscribeTimer ();
494
497
TriggerResubscriptionForLivenessTimeout (CHIP_ERROR_TIMEOUT);
495
498
}
496
499
You can’t perform that action at this time.
0 commit comments