Skip to content
Snippets Groups Projects
Commit 91a9664a authored by Kateryna Kostiuk's avatar Kateryna Kostiuk Committed by Sébastien Blin
Browse files

fix: deadlock in check audio

When call state is RINGING manager will enumerate through all calls
to check current call. It will cause lock when subcall and parent call
update state at the same time.

Change-Id: I0850ea685046cf3c981700e524ca184becdb96e5
parent 0df0d2bb
No related branches found
No related tags found
No related merge requests found
......@@ -110,7 +110,11 @@ Call::Call(Account& account, const std::string& id, Call::CallType type,
}
checkPendingIM();
checkAudio();
std::weak_ptr<Call> callWkPtr = shared_from_this();
runOnMainThread([callWkPtr]{
if (auto call = callWkPtr.lock())
call->checkAudio();
});
// if call just started ringing, schedule call timeout
if (type_ == CallType::INCOMING and cnx_state == ConnectionState::RINGING) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment