peer_connection: ice must be always true

This avoid the TlsSocketEndpoint to use an invalidated ICE.

GitLab: #763
Change-Id: If89a70521e523e19c38fd61c20c483b89a9b6413
This commit is contained in:
Sébastien Blin
2022-09-09 10:57:51 -04:00
parent 206112b579
commit 1cc1af80aa

View File

@ -98,6 +98,8 @@ IceSocketEndpoint::IceSocketEndpoint(std::shared_ptr<IceTransport> 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_)] {});
}
}