fix dbinder endless loop

Signed-off-by: wanderer-dl122 <dengliang21@huawei.com>
This commit is contained in:
wanderer-dl122 2023-09-06 18:03:14 +08:00
parent 3664c58505
commit 9ba9b4c420

View File

@ -778,6 +778,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);