!789 多设备时,rpc可能陷入死循环

Merge pull request !789 from dengliang/master
This commit is contained in:
openharmony_ci 2023-10-18 08:05:58 +00:00 committed by Gitee
commit 2c25564a0d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -730,6 +730,7 @@ bool DBinderService::ProcessOnSessionClosed(std::shared_ptr<Session> session)
std::lock_guard<std::mutex> lock(threadLockMutex_);
for (auto it = threadLockInfo_.begin(); it != threadLockInfo_.end();) {
if (it->second->networkId != session->GetPeerDeviceId()) {
it++;
continue;
}
std::unique_lock<std::mutex> lock(it->second->mutex);