From 45931fbbcfa5395072d01447293e9bdadf8259e2 Mon Sep 17 00:00:00 2001 From: yeyuning Date: Thu, 28 Dec 2023 00:17:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AD=89=E5=BE=85=E6=9C=AC=E5=9C=B0=E8=AF=81?= =?UTF-8?q?=E4=B9=A6=E5=88=9D=E5=A7=8B=E5=8C=96=E7=BA=BF=E7=A8=8B=E7=BB=93?= =?UTF-8?q?=E6=9D=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yeyuning Change-Id: I878afe72eadd5017449a27bd9d10e9d0cae0d3e9 --- services/key_enable/utils/src/local_code_sign_utils.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/key_enable/utils/src/local_code_sign_utils.cpp b/services/key_enable/utils/src/local_code_sign_utils.cpp index df2c329..292950d 100644 --- a/services/key_enable/utils/src/local_code_sign_utils.cpp +++ b/services/key_enable/utils/src/local_code_sign_utils.cpp @@ -57,11 +57,14 @@ protected: do { ret = LocalCodeSignKit::InitLocalCertificate(cert); usleep(INIT_LOCAL_CERT_SLEEP_US); - } while (ret == CS_ERR_SA_GET_PROXY); + } while (ret == CS_ERR_SA_GET_PROXY && !ShouldExit()); success = (ret == CS_SUCCESS); g_condition.notify_one(); return true; } + bool ShouldExit() { + return this->IsExitPending(); + } private: bool success = false; ByteBuffer cert; @@ -93,5 +96,6 @@ int32_t InitLocalCertificate(uint8_t *certData, uint32_t *certSize) } *certSize = cert.GetSize(); + thread->NotifyExitAsync(); return CS_SUCCESS; } \ No newline at end of file -- Gitee