summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSho Amano <samano@xevo.com>2018-08-30 22:36:04 +0900
committerSho Amano <samano@xevo.com>2018-08-31 21:10:36 +0900
commit2beb476e7b43590a06d7470ce03e9e62b0fe3b80 (patch)
treeab3ec1e0ba522615322405d67a80db88d3f21ec1
parent4b343d37705f495eb782a8b0798c2c27d4314a87 (diff)
downloadsdl_ios-2beb476e7b43590a06d7470ce03e9e62b0fe3b80.tar.gz
fix: lifecycle state machine not updated on dedicated queue
The response handler was invoked on com.sdl.rpcProcessingQueue queue. To keep consistency, the state machine is fixed to run on its lifecycleQueue.
-rw-r--r--SmartDeviceLink/SDLLifecycleManager.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/SmartDeviceLink/SDLLifecycleManager.m b/SmartDeviceLink/SDLLifecycleManager.m
index 33fda76f6..2599d97ef 100644
--- a/SmartDeviceLink/SDLLifecycleManager.m
+++ b/SmartDeviceLink/SDLLifecycleManager.m
@@ -451,7 +451,9 @@ SDLLifecycleState *const SDLLifecycleStateReady = @"Ready";
SDLLogE(@"SDL Error unregistering, we are going to hard disconnect: %@, response: %@", error, response);
}
- [weakSelf.lifecycleStateMachine transitionToState:SDLLifecycleStateStopped];
+ dispatch_async(weakSelf.lifecycleQueue, ^{
+ [weakSelf.lifecycleStateMachine transitionToState:SDLLifecycleStateStopped];
+ });
}];
}