Skip to content

Commit

Permalink
Disabling this
Browse files Browse the repository at this point in the history
  • Loading branch information
woody-apple committed Jul 8, 2024
1 parent 8786012 commit d386a72
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 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 @@ -174,8 +177,8 @@ - (void)_deviceInternalStateChanged:(MTRDevice *)device;
UnsolicitedMessageFromPublisherHandler unsolicitedMessageFromPublisherHandler, ReportBeginHandler reportBeginHandler,
ReportEndHandler reportEndHandler)
: MTRBaseSubscriptionCallback(attributeReportCallback, eventReportCallback, errorCallback, resubscriptionCallback,
subscriptionEstablishedHandler, onDoneHandler, unsolicitedMessageFromPublisherHandler, reportBeginHandler,
reportEndHandler)
subscriptionEstablishedHandler, onDoneHandler, unsolicitedMessageFromPublisherHandler, reportBeginHandler,
reportEndHandler)
{
}

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 d386a72

Please sign in to comment.