Skip to content
Snippets Groups Projects
Commit 6c7042e1 authored by Sébastien Blin's avatar Sébastien Blin
Browse files

connectionmanager: catch exception if initIceInstance throws

Change-Id: Id84e465996138a16aa425dde37baa389240f4221
parent e4cca148
Branches
No related tags found
No related merge requests found
......@@ -643,7 +643,12 @@ ConnectionManager::Impl::connectDevice(const std::shared_ptr<dht::crypto::Certif
info->ice_->setOnShutdown([eraseInfo]() {
dht::ThreadPool::io().run([eraseInfo = std::move(eraseInfo)] { eraseInfo(); });
});
try {
info->ice_->initIceInstance(ice_config);
} catch (const std::exception& e) {
JAMI_ERROR("{}", e.what());
dht::ThreadPool::io().run([eraseInfo = std::move(eraseInfo)] { eraseInfo(); });
}
});
});
}
......@@ -1022,7 +1027,12 @@ ConnectionManager::Impl::onDhtPeerRequest(const PeerConnectionRequest& req,
info->ice_->setOnShutdown([eraseInfo]() {
dht::ThreadPool::io().run([eraseInfo = std::move(eraseInfo)] { eraseInfo(); });
});
try {
info->ice_->initIceInstance(ice_config);
} catch (const std::exception& e) {
JAMI_ERROR("{}", e.what());
dht::ThreadPool::io().run([eraseInfo = std::move(eraseInfo)] { eraseInfo(); });
}
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment