summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuller, Alexander (A.) <amulle19@ford.com>2017-03-01 13:10:36 -0800
committerMuller, Alexander (A.) <amulle19@ford.com>2017-03-01 13:10:36 -0800
commit254eddf6f5300e184fe8d645d53fc76191434745 (patch)
tree346ceca042ba290a53b853a62ba31ba21ae87ee9
parent910259cd9207fd2447e054c2f164159bdc9d89fc (diff)
parent16104d97b753bce1795798b3a2852a91b62cde4a (diff)
downloadsdl_ios-254eddf6f5300e184fe8d645d53fc76191434745.tar.gz
Merge remote-tracking branch 'origin/master' into develop
* origin/master: Added check for starting a lifecycle manager that has already been started.
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m5
1 files changed, 5 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 6e2979d21..dba15fbdd 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -111,6 +111,11 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
}
- (void)startWithReadyHandler:(SDLManagerReadyBlock)readyHandler {
+ if (![self.lifecycleStateMachine isCurrentState:SDLLifecycleStateStopped]) {
+ [SDLDebugTool logFormat:@"Warning: SDL has already been started, this attempt will be ignored."];
+ return;
+ }
+
self.readyHandler = [readyHandler copy];
[self.lifecycleStateMachine transitionToState:SDLLifecycleStateStarted];