@@ -963,6 +963,7 @@ - (void)_changeInternalState:(MTRInternalDeviceState)state
963
963
MTR_LOG (" %@ internal state change %lu => %lu" , self, static_cast <unsigned long >(lastState), static_cast <unsigned long >(state));
964
964
965
965
/* BEGIN DRAGONS: This is a huge hack for a specific use case, do not rename, remove or modify behavior here */
966
+ // TODO: This should only be called for thread devices
966
967
id <MTRDeviceDelegate> delegate = _weakDelegate.strongObject ;
967
968
if ([delegate respondsToSelector: @selector (_deviceInternalStateChanged: )]) {
968
969
dispatch_async (_delegateQueue, ^{
@@ -3650,17 +3651,18 @@ - (BOOL)_deviceHasActiveSubscription
3650
3651
{
3651
3652
std::lock_guard lock (_lock);
3652
3653
3654
+ // TODO: This should always return YES for thread devices
3653
3655
return HaveSubscriptionEstablishedRightNow (_internalDeviceState);
3654
3656
}
3655
3657
3656
3658
- (void )_deviceMayBeReachable
3657
3659
{
3658
- assertChipStackLockedByCurrentThread ();
3659
-
3660
3660
MTR_LOG (" %@ _deviceMayBeReachable called" , self);
3661
-
3662
- [self _triggerResubscribeWithReason: @" SPI client indicated the device may now be reachable"
3663
- nodeLikelyReachable: YES ];
3661
+ // TODO: This should only be allowed for thread devices
3662
+ [_deviceController asyncDispatchToMatterQueue: ^{
3663
+ [self _triggerResubscribeWithReason: @" SPI client indicated the device may now be reachable"
3664
+ nodeLikelyReachable: YES ];
3665
+ } errorHandler: nil ];
3664
3666
}
3665
3667
3666
3668
/* END DRAGONS */
0 commit comments