Skip to content

Commit

Permalink
Disabling this darwin feature, doesn't seem to be of use, and is cras…
Browse files Browse the repository at this point in the history
…hing (#34238)

* Disabling this

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
woody-apple and restyled-commits authored Jul 9, 2024
1 parent 1ca9ac0 commit 90310f2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/darwin/Framework/CHIP/MTRDevice.mm
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@

#define kSecondsToWaitBeforeMarkingUnreachableAfterSettingUpSubscription 10

// Disabling pending crashes
#define ENABLE_CONNECTIVITY_MONITORING 0

// Consider moving utility classes to their own file
#pragma mark - Utility Classes

Expand Down Expand Up @@ -1381,15 +1384,15 @@ - (void)_handleResubscriptionNeededWithDelay:(NSNumber *)resubscriptionDelayMs
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, resubscriptionDelayNs), self.queue, resubscriptionBlock);
}

// Set up connectivity monitoring in case network routability changes for the positive, to accellerate resubscription
// Set up connectivity monitoring in case network routability changes for the positive, to accelerate resubscription
[self _setupConnectivityMonitoring];
}

- (void)_handleSubscriptionReset:(NSNumber * _Nullable)retryDelay
{
std::lock_guard lock(_lock);

// If we are here, then either we failed to establish initil CASE, or we
// If we are here, then either we failed to establish initial CASE, or we
// failed to send the initial SubscribeRequest message, or our ReadClient
// has given up completely. Those all count as "we have tried and failed to
// subscribe".
Expand Down Expand Up @@ -2253,6 +2256,7 @@ - (void)_createDataVersionFilterListFromDictionary:(NSDictionary<MTRClusterPath

- (void)_setupConnectivityMonitoring
{
#if ENABLE_CONNECTIVITY_MONITORING
// Dispatch to own queue first to avoid deadlock with syncGetCompressedFabricID
dispatch_async(self.queue, ^{
// Get the required info before setting up the connectivity monitor
Expand All @@ -2277,6 +2281,7 @@ - (void)_setupConnectivityMonitoring
errorHandler:nil];
} queue:self.queue];
});
#endif
}

- (void)_stopConnectivityMonitoring
Expand Down

0 comments on commit 90310f2

Please sign in to comment.