From 1cc1af80aaab34e181dcbcddb0819987c6578a0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blin?= Date: Fri, 9 Sep 2022 10:57:51 -0400 Subject: [PATCH] peer_connection: ice must be always true This avoid the TlsSocketEndpoint to use an invalidated ICE. GitLab: #763 Change-Id: If89a70521e523e19c38fd61c20c483b89a9b6413 --- src/peer_connection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index 9c1f90837..15453bb3b 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -98,6 +98,8 @@ IceSocketEndpoint::IceSocketEndpoint(std::shared_ptr ice, bool isS IceSocketEndpoint::~IceSocketEndpoint() { shutdown(); + if (ice_) + dht::ThreadPool::io().run([ice = std::move(ice_)] {}); } void @@ -109,7 +111,6 @@ IceSocketEndpoint::shutdown() // any blocking operation. ice_->cancelOperations(); ice_->stop(); - dht::ThreadPool::io().run([ice = std::move(ice_)] {}); } }