Skip to content

Commit

Permalink
[Matter.framework] When the device is entering suspended state and at…
Browse files Browse the repository at this point in the history
… the same time _ensureSubscriptionForExistingDelegates is called with an error from getting a session it crashes with _os_unfair_lock_recursive_abort since it is called on the same thread and the error handling code also try to get a lock
  • Loading branch information
vivien-apple committed Oct 9, 2024
1 parent a629204 commit f910222
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/darwin/Framework/CHIP/MTRDevice_Concrete.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2404,8 +2404,10 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason
NSNumber * _Nullable retryDelay) {
if (error != nil) {
MTR_LOG_ERROR("%@ getSessionForNode error %@", self, error);
[self _handleSubscriptionError:error];
[self _handleSubscriptionReset:retryDelay];
[self->_deviceController asyncDispatchToMatterQueue:^{
[self _handleSubscriptionError:error];
[self _handleSubscriptionReset:retryDelay];
} errorHandler:nil];
return;
}

Expand Down

0 comments on commit f910222

Please sign in to comment.