Skip to content

Commit

Permalink
Addressed PR review - moved code comment to correct place
Browse files Browse the repository at this point in the history
  • Loading branch information
jtung-apple committed Aug 6, 2024
1 parent 80469f6 commit 9fb264a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/darwin/Framework/CHIP/MTRDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,7 @@ - (void)_handleSubscriptionEstablished
// No need to monitor connectivity after subscription establishment
[self _stopConnectivityMonitoring];

// reset subscription attempt wait time when subscription succeeds
_lastSubscriptionAttemptWait = 0;

auto initialSubscribeStart = _initialSubscribeStart;
Expand Down Expand Up @@ -2476,8 +2477,6 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason
std::lock_guard lock(self->_lock);

// First synchronously change state

// reset subscription attempt wait time when subscription succeeds
if (HadSubscriptionEstablishedOnce(self->_internalDeviceState)) {
[self _changeInternalState:MTRInternalDeviceStateLaterSubscriptionEstablished];
} else {
Expand Down

0 comments on commit 9fb264a

Please sign in to comment.