Skip to content
Snippets Groups Projects
Commit 704a614c authored by Sébastien Blin's avatar Sébastien Blin Committed by Philippe Gorley
Browse files

p2p: do not close current connection if already ready


6f15399e broke the multi-transfer
with the same contact because it closes previous transfers. We need
to keep correct turn connections.

Change-Id: I0cb9942417b10cc1aaa7d6879613c685dc5de2ad
Reviewed-by: default avatarPhilippe Gorley <philippe.gorley@savoirfairelinux.com>
parent d30be45b
No related branches found
No related tags found
No related merge requests found
......@@ -425,11 +425,16 @@ DhtPeerConnector::Impl::turnConnect()
if (turnAuthv6_ && !turnAuthv6_->isReady())
turnAuthv6_.release();
if (!turnAuthv4_ || !turnAuthv4_->isReady()) {
turn_param_v4.authorized_family = PJ_AF_INET;
turnAuthv4_ = std::make_unique<TurnTransport>(turn_param_v4);
}
if (!turnAuthv6_ || !turnAuthv6_->isReady()) {
auto turn_param_v6 = turn_param_v4;
turn_param_v6.authorized_family = PJ_AF_INET6;
turnAuthv6_ = std::make_unique<TurnTransport>(turn_param_v6);
}
// Wait until TURN server READY state (or timeout)
Timeout<Clock> timeout {NET_CONNECTION_TIMEOUT};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment