From 121eeedc1427aafbadb64f357d851e4e2cb81161 Mon Sep 17 00:00:00 2001 From: Philipp Hancke Date: Tue, 18 Jun 2024 13:42:29 -0700 Subject: [PATCH] Improve icecandidateerror text when the TURN/TCP connection is not established This can be tested by trying to connect to a TURN server that does not listen on a specific TCP port. BUG=None Change-Id: I7029112afa4b1b4376220dfc2d613a30090e4f7d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354901 Reviewed-by: Harald Alvestrand Reviewed-by: Markus Handell Commit-Queue: Philipp Hancke Cr-Commit-Position: refs/heads/main@{#42595} --- p2p/base/turn_port.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/p2p/base/turn_port.cc b/p2p/base/turn_port.cc index 201903587d..e58d03e924 100644 --- a/p2p/base/turn_port.cc +++ b/p2p/base/turn_port.cc @@ -989,7 +989,9 @@ void TurnPort::Release() { void TurnPort::Close() { if (!ready()) { - OnAllocateError(SERVER_NOT_REACHABLE_ERROR, ""); + OnAllocateError( + SERVER_NOT_REACHABLE_ERROR, + GetProtocol() != PROTO_UDP ? "Failed to establish connection" : ""); } request_manager_.Clear(); // Stop the port from creating new connections.