Skip to content
Snippets Groups Projects
Commit 7d8e4323 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

call: avoid deadlock on hangup

This patch move checkAudio() out of call mutex. Because it could cause
deadlock if subcallStateChanged() called at the same time.

Change-Id: Iee06874fb79c8e0953e061f7a669b3f61f13d8b9
parent 6f687dfa
No related branches found
No related tags found
No related merge requests found
...@@ -152,7 +152,6 @@ Call::removeCall() ...@@ -152,7 +152,6 @@ Call::removeCall()
setState(CallState::OVER); setState(CallState::OVER);
if (Recordable::isRecording()) if (Recordable::isRecording())
Recordable::stopRecording(); Recordable::stopRecording();
Manager::instance().checkAudio();
} }
const std::string& const std::string&
......
...@@ -762,6 +762,7 @@ SIPCall::sendTextMessage(const std::map<std::string, std::string>& messages, ...@@ -762,6 +762,7 @@ SIPCall::sendTextMessage(const std::map<std::string, std::string>& messages,
void void
SIPCall::removeCall() SIPCall::removeCall()
{
{ {
std::lock_guard<std::recursive_mutex> lk {callMutex_}; std::lock_guard<std::recursive_mutex> lk {callMutex_};
JAMI_WARN("[call:%s] removeCall()", getCallId().c_str()); JAMI_WARN("[call:%s] removeCall()", getCallId().c_str());
...@@ -770,6 +771,8 @@ SIPCall::removeCall() ...@@ -770,6 +771,8 @@ SIPCall::removeCall()
inv.reset(); inv.reset();
setTransport({}); setTransport({});
} }
Manager::instance().checkAudio();
}
void void
SIPCall::onFailure(signed cause) SIPCall::onFailure(signed cause)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment