summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladSemenyuk <VSemenyuk@luxoft.com>2021-09-28 21:43:58 +0300
committerGitHub <noreply@github.com>2021-09-28 14:43:58 -0400
commit86dd7b1c9802005657a8e1dddeae79db24ba6ae0 (patch)
treea7d6d527177f35189c3842b51d5574d5ca0930a0
parentde58a410a5842f0c8873feb6de16ca06832077ee (diff)
downloadsdl_core-86dd7b1c9802005657a8e1dddeae79db24ba6ae0.tar.gz
Prevent HMI commands processing while SDL is stopping (#3781)
-rw-r--r--src/components/application_manager/src/commands/request_to_hmi.cc1
-rw-r--r--src/components/application_manager/src/rpc_service_impl.cc4
2 files changed, 4 insertions, 1 deletions
diff --git a/src/components/application_manager/src/commands/request_to_hmi.cc b/src/components/application_manager/src/commands/request_to_hmi.cc
index ac6bda0557..86f25711da 100644
--- a/src/components/application_manager/src/commands/request_to_hmi.cc
+++ b/src/components/application_manager/src/commands/request_to_hmi.cc
@@ -137,6 +137,7 @@ bool RequestToHMI::Init() {
}
bool RequestToHMI::CleanUp() {
+ unsubscribe_from_all_hmi_events();
return true;
}
diff --git a/src/components/application_manager/src/rpc_service_impl.cc b/src/components/application_manager/src/rpc_service_impl.cc
index 67ff7cb6f0..a610bd4371 100644
--- a/src/components/application_manager/src/rpc_service_impl.cc
+++ b/src/components/application_manager/src/rpc_service_impl.cc
@@ -392,7 +392,9 @@ bool RPCServiceImpl::ManageHMICommand(const commands::MessageSharedPtr message,
if (kRequest == message_type) {
SDL_LOG_DEBUG("ManageHMICommand");
command->set_warning_info(warning_info);
- request_ctrl_.AddHMIRequest(command);
+ if (!app_manager_.IsStopping()) {
+ request_ctrl_.AddHMIRequest(command);
+ }
}
if (command->Init()) {