diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-05-03 10:49:01 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-03 10:49:01 -0400 |
commit | 1ab08e7f4aa373d4fab9ab02b86100a53ab464bc (patch) | |
tree | 1fc75b96e84f4c3d983e773efea87abee17f0a38 | |
parent | f9dd27e3acbdecdfcd756865305a4cbfcf472f30 (diff) | |
parent | c4578976cdb3523af72841e110a9a42efd22950e (diff) | |
download | sdl_ios-1ab08e7f4aa373d4fab9ab02b86100a53ab464bc.tar.gz |
Merge pull request #1236 from smartdevicelink/bugfix/issue_1172_state_transition
Ignore Errant Connections While Reconnecting
-rw-r--r-- | SmartDeviceLink/SDLLifecycleManager.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m index 8cf5daa91..0c3b257ab 100644 --- a/SmartDeviceLink/SDLLifecycleManager.m +++ b/SmartDeviceLink/SDLLifecycleManager.m @@ -239,6 +239,8 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; - (void)sdl_stopManager:(BOOL)shouldRestart { SDLLogV(@"Stopping manager, %@", (shouldRestart ? @"will restart" : @"will not restart")); + self.proxy = nil; + [self.fileManager stop]; [self.permissionManager stop]; [self.lockScreenManager stop]; @@ -259,7 +261,6 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; self.hmiLevel = nil; self.audioStreamingState = nil; self.systemContext = nil; - self.proxy = nil; // Due to a race condition internally with EAStream, we cannot immediately attempt to restart the proxy, as we will randomly crash. // Apple Bug ID #30059457 @@ -277,6 +278,9 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready"; } - (void)didEnterStateConnected { + // Ignore the connection while we are reconnecting. The proxy needs to be disposed and restarted in order to ensure correct state. https://github.com/smartdevicelink/sdl_ios/issues/1172 + if ([self.lifecycleState isEqualToString:SDLLifecycleStateReconnecting]) { return; } + // If we have security managers, add them to the proxy if (self.configuration.streamingMediaConfig.securityManagers != nil) { SDLLogD(@"Adding security managers"); |