diff options
author | Aleksandr Kutsan <AKutsan@luxoft.com> | 2020-07-01 21:00:21 +0300 |
---|---|---|
committer | sniukalov <sniukaov@luxoft.com> | 2020-07-03 13:24:37 +0300 |
commit | 9d447c8f69dc0d59ca370a9379df73b73a57fe63 (patch) | |
tree | 27a69c7ab7c75c7a6cde2f9d27a07bbf6d85d96f | |
parent | 28698bfc8aaa1ccfffb0742a68906f39e3b68d4b (diff) | |
download | sdl_core-9d447c8f69dc0d59ca370a9379df73b73a57fe63.tar.gz |
Close connection after RESOURCE_CONSTRAINT
RESOURCE_CONSTRAINT unregister reason will close connection for all
applications, but not only Web engine projection
2 files changed, 2 insertions, 4 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc index 12c59390cd..30d9853d97 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/src/commands/mobile/on_app_interface_unregistered_notification.cc @@ -63,11 +63,9 @@ void OnAppInterfaceUnregisteredNotification::Run() { bool OnAppInterfaceUnregisteredNotification::IsFinalMessage() const { using Reason = mobile_apis::AppInterfaceUnregisteredReason::eType; - const auto app = application_manager_.application(connection_key()); const auto reason = static_cast<Reason>( (*message_)[strings::msg_params][strings::reason].asInt()); - return app && app->webengine_projection_enabled() && - Reason::RESOURCE_CONSTRAINT == reason; + return Reason::RESOURCE_CONSTRAINT == reason; } } // namespace commands } // namespace sdl_rpc_plugin diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc index ef7ef7a091..64dcec2e0a 100644 --- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc +++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/mobile/on_app_interface_unregistered_notification_test.cc @@ -116,7 +116,7 @@ TEST_F(OnAppInterfaceUnregisteredNotificationTest, (*message_)[am::strings::msg_params][am::strings::reason] = Reason::RESOURCE_CONSTRAINT; - CheckResponseParameters(false, false); + CheckResponseParameters(false, true); ASSERT_TRUE(command_->Init()); command_->Run(); |