From 973afbcf6af0142bb1306c9ba0068b81c0505ffa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= <sebastien.blin@savoirfairelinux.com> Date: Thu, 4 Feb 2021 11:52:21 -0500 Subject: [PATCH] manager: move answer call on io pool answering and joining a participant can take quite some time, avoid to lock main thread for that. Change-Id: I4a2982ba8c35cdc7861ff5db01cffd0678777bea --- src/manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manager.cpp b/src/manager.cpp index 3dbf5a87d5..1fd2505361 100644 --- a/src/manager.cpp +++ b/src/manager.cpp @@ -1905,7 +1905,7 @@ Manager::incomingCall(Call& call, const std::string& accountId) auto currentCall = getCurrentCall(); if (account->isRendezVous()) { - runOnMainThread([this, callID] { + dht::ThreadPool::io().run([this, callID] { answerCall(callID); auto call = getCallFromCallID(callID); auto accountId = call->getAccountId(); @@ -1936,7 +1936,7 @@ Manager::incomingCall(Call& call, const std::string& accountId) emitSignal<DRing::CallSignal::ConferenceCreated>(conf->getConfID()); }); } else if (pimpl_->autoAnswer_) { - runOnMainThread([this, callID] { answerCall(callID); }); + dht::ThreadPool::io().run([this, callID] { answerCall(callID); }); } else if (currentCall) { // Test if already calling this person if (currentCall->getAccountId() == accountId -- GitLab