mirror of
https://github.com/openharmony/security_security_component_manager.git
synced 2026-08-24 22:51:27 -04:00
解决死锁问题
Signed-off-by: panyongchaox <panyongchao3@huawei.com> Change-Id: I7136914c8f82324293314c30b30bc72e657a4e21
This commit is contained in:
@@ -143,10 +143,12 @@ int32_t SecCompClient::RegisterSecurityComponent(SecCompType type,
|
||||
if (std::find(RETRY_CODE_LIST.begin(), RETRY_CODE_LIST.end(), res) == RETRY_CODE_LIST.end()) {
|
||||
return res;
|
||||
}
|
||||
|
||||
std::unique_lock<std::mutex> lock(secCompSaMutex_);
|
||||
auto waitStatus = secCompSACon_.wait_for(lock, std::chrono::milliseconds(SA_DIED_TIME_OUT),
|
||||
[this]() { return serviceAbilityNeedLoadFlag_; });
|
||||
bool waitStatus = false;
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(secCompSaMutex_);
|
||||
waitStatus = secCompSACon_.wait_for(lock, std::chrono::milliseconds(SA_DIED_TIME_OUT),
|
||||
[this]() { return serviceAbilityNeedLoadFlag_; });
|
||||
}
|
||||
if (waitStatus) {
|
||||
proxy = GetProxy(true);
|
||||
if (proxy != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user