Skip to content
Snippets Groups Projects
Commit c1e64138 authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud
Browse files

jamiaccount: re-add searching/connecting timeouts

Because we removed the eventloop to check pending calls, timeout are not checked
and only done on successfully negotiated ICE. We should re-add timeouts to avoid
any lock during the Searching or the Connecting state.

Change-Id: Id4f9a4869c171a5c3f316b76e9ecede1bc76ed97
Gitlab: #244
parent 06560eab
No related branches found
No related tags found
No related merge requests found
......@@ -610,6 +610,11 @@ JamiAccount::startOutgoingCall(const std::shared_ptr<SIPCall>& call, const std::
peer_account,
tls::CertificateStore::instance().getCertificate(toUri)
});
Manager::instance().scheduleTask([w, callId=call->getCallId()]() {
if (auto shared = w.lock())
shared->checkPendingCall(callId);
}, std::chrono::steady_clock::now() + ICE_NEGOTIATION_TIMEOUT);
return false;
});
};
......@@ -2230,6 +2235,11 @@ JamiAccount::replyToIncomingIceMsg(const std::shared_ptr<SIPCall>& call,
/*.from = */ peer_ice_msg.from,
/*.from_account = */ from_id,
/*.from_cert = */ from_cert});
Manager::instance().scheduleTask([w=weak(), callId=call->getCallId()]() {
if (auto shared = w.lock())
shared->checkPendingCall(callId);
}, std::chrono::steady_clock::now() + ICE_NEGOTIATION_TIMEOUT);
}
void
......
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