Skip to content
Snippets Groups Projects
Commit d7a83d24 authored by Andreas Traczyk's avatar Andreas Traczyk
Browse files

sipcall: use threadpool to destroy temp media transport

IceTransport desctruction shouldn't block on the main thread.
This problem is noticable when calling refuseCall from the UI
thread and results in a blockage lasting MAX_DESTRUCTION_TIMEOUT.
Even if MAX_DESTRUCTION_TIMEOUT is not reached, a polling interval
of 500ms requires this destruction be done async.

Change-Id: Ib6f9c0cff155755de30966875ab76e7288d39405
parent e7537f3a
No related branches found
No related tags found
No related merge requests found
......@@ -1005,7 +1005,9 @@ SIPCall::removeCall()
Call::removeCall();
if (mediaTransport_)
dht::ThreadPool::io().run([ice = std::move(mediaTransport_)] {});
tmpMediaTransport_.reset();
if (tmpMediaTransport_)
dht::ThreadPool::io().run([ice = std::make_shared<decltype(tmpMediaTransport_)>(
std::move(tmpMediaTransport_))] {});
setInviteSession();
setTransport({});
}
......
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