Skip to content

Commit

Permalink
Merge branch 'bugfix/issue_1326_background_task_suspended_before_RAI_…
Browse files Browse the repository at this point in the history
…sent'
  • Loading branch information
joeljfischer committed Jul 18, 2019
2 parents cccff5c + 1276f0e commit 9e0d674
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions SmartDeviceLink/SDLLifecycleManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ - (void)sdl_stopManager:(BOOL)shouldRestart {
if (shouldRestart) {
[strongSelf sdl_transitionToState:SDLLifecycleStateStarted];
} else {
// End any background tasks because a session will not be established
// End the background task because a session will not be established
[self.backgroundTaskManager endBackgroundTask];
}
});
Expand Down Expand Up @@ -498,6 +498,9 @@ - (void)didEnterStateReady {
[self.delegate audioStreamingState:SDLAudioStreamingStateNotAudible didChangeToState:self.audioStreamingState];
}
});

// Stop the background task now that setup has completed
[self.backgroundTaskManager endBackgroundTask];
}

- (void)didEnterStateUnregistering {
Expand Down Expand Up @@ -708,9 +711,6 @@ - (nullable NSString *)authToken {
- (void)transportDidConnect {
SDLLogD(@"Transport connected");

// End any background tasks since the transport connected successfully
[self.backgroundTaskManager endBackgroundTask];

dispatch_async(self.lifecycleQueue, ^{
[self sdl_transitionToState:SDLLifecycleStateConnected];
});
Expand Down

0 comments on commit 9e0d674

Please sign in to comment.