From 63e1d246122cfa740da0d3c918db708d6f46d3d0 Mon Sep 17 00:00:00 2001 From: Ilho Kim Date: Mon, 19 Oct 2020 11:30:15 +0900 Subject: [PATCH] Send a finished signal after all operation is completed Since the clean type recovery has been added If the process of all steps is successful, the installer considers all of the installation to be successful and sends a finished signal If there is an operation in a clean that has not yet been completed like database commit operation, there is a timing issue that an application that received the finished signal can access where it is not completed Change-Id: I3195b46ded497cc67bfc2d12e528d9a9e7961cea Signed-off-by: Ilho Kim --- src/common/installer/app_installer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/installer/app_installer.cc b/src/common/installer/app_installer.cc index 43f6b3c..9cd1e4e 100644 --- a/src/common/installer/app_installer.cc +++ b/src/common/installer/app_installer.cc @@ -305,7 +305,6 @@ AppInstaller::Result AppInstaller::Clean() { recovery_file->set_cleanup(true); recovery_file->WriteAndCommitFileContent(); } - SendFinished(status_); do { if (it_ == steps_.end()) @@ -317,6 +316,7 @@ AppInstaller::Result AppInstaller::Clean() { } } while (it_-- != steps_.begin()); sync(); + SendFinished(status_); LogHistoryEnd(true); -- 2.7.4