Update ContextAccess.cpp

This commit is contained in:
huzhichengdd 2022-01-12 17:03:55 +08:00 committed by GitHub
parent 430bb12a35
commit d06486584b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -160,7 +160,7 @@ void ContextAccess::initialize()
if(!ptr)
return;
UserPtr changed_user = entity ? typeid_cast<UserPtr>(entity) : nullptr;
std::lock_guard lock{ptr->mutex};
std::lock_guard lock2{ptr->mutex};
ptr->setUser(changed_user);
});
setUser(access_control->read<User>(*params.user_id));