@@ -814,6 +814,7 @@ - (void)_ensureSubscriptionForExistingDelegates:(NSString *)reason
814
814
if ([self _deviceUsesThread ]) {
815
815
MTR_LOG (" => %@ - device is a thread device, scheduling in pool" , self);
816
816
mtr_weakify (self);
817
+ NSString * description = [NSString stringWithFormat: @" MTRDevice setDelegate first subscription / controller resume (%p )" , self ];
817
818
[self _scheduleSubscriptionPoolWork: ^{
818
819
mtr_strongify (self);
819
820
VerifyOrReturn (self);
@@ -827,7 +828,7 @@ - (void)_ensureSubscriptionForExistingDelegates:(NSString *)reason
827
828
std::lock_guard lock (self->_lock );
828
829
[self _clearSubscriptionPoolWork ];
829
830
}];
830
- } inNanoseconds:0 description:@"MTRDevice setDelegate first subscription" ];
831
+ } inNanoseconds: 0 description: description ];
831
832
} else {
832
833
[_deviceController asyncDispatchToMatterQueue: ^{
833
834
std::lock_guard lock (self->_lock );
@@ -1350,7 +1351,8 @@ - (void)_handleResubscriptionNeededWithDelayOnDeviceQueue:(NSNumber *)resubscrip
1350
1351
if (deviceUsesThread) {
1351
1352
std::lock_guard lock (_lock);
1352
1353
// For Thread-enabled devices, schedule the _triggerResubscribeWithReason call to run in the subscription pool
1353
- [self _scheduleSubscriptionPoolWork:resubscriptionBlock inNanoseconds:resubscriptionDelayNs description:@"ReadClient resubscription"];
1354
+ NSString * description = [NSString stringWithFormat: @" ReadClient resubscription (%p )" , self ];
1355
+ [self _scheduleSubscriptionPoolWork: resubscriptionBlock inNanoseconds: resubscriptionDelayNs description: description];
1354
1356
} else {
1355
1357
// For non-Thread-enabled devices, just call the resubscription block after the specified time
1356
1358
dispatch_after (dispatch_time (DISPATCH_TIME_NOW, resubscriptionDelayNs), self.queue , resubscriptionBlock);
@@ -1467,7 +1469,8 @@ - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay
1467
1469
int64_t resubscriptionDelayNs = static_cast <int64_t >(secondsToWait * NSEC_PER_SEC);
1468
1470
if ([self _deviceUsesThread ]) {
1469
1471
// For Thread-enabled devices, schedule the _reattemptSubscriptionNowIfNeededWithReason call to run in the subscription pool
1470
- [self _scheduleSubscriptionPoolWork:resubscriptionBlock inNanoseconds:resubscriptionDelayNs description:@"MTRDevice resubscription"];
1472
+ NSString * description = [NSString stringWithFormat: @" MTRDevice resubscription (%p )" , self ];
1473
+ [self _scheduleSubscriptionPoolWork: resubscriptionBlock inNanoseconds: resubscriptionDelayNs description: description];
1471
1474
} else {
1472
1475
// For non-Thread-enabled devices, just call the resubscription block after the specified time
1473
1476
dispatch_after (dispatch_time (DISPATCH_TIME_NOW, resubscriptionDelayNs), self.queue , resubscriptionBlock);
0 commit comments