Skip to content

Commit

Permalink
Merge branch 'jens/stop-accessory-connection-failure'
Browse files Browse the repository at this point in the history
  • Loading branch information
jensutbult committed Apr 30, 2024
2 parents 2159171 + 4d8900c commit 4d92423
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,15 +271,15 @@ - (BOOL)startSynchronous {

- (void)stop {
YKFLogInfo(@"Accessory session stop requested.");

self.observeAccessoryConnection = NO;
self.observeApplicationState = NO;

if (self.connectionState != YKFAccessoryConnectionStateOpen) {
YKFLogInfo(@"Accessory session stop ignored. The session is already stopped.");
return;
}

self.observeAccessoryConnection = NO;
self.observeApplicationState = NO;


[self closeSession];
}

Expand Down

0 comments on commit 4d92423

Please sign in to comment.