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 <hta@webrtc.org>
Reviewed-by: Markus Handell <handellm@google.com>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Cr-Commit-Position: refs/heads/main@{#42595}
This commit is contained in:
Philipp Hancke 2024-06-18 13:42:29 -07:00 committed by WebRTC LUCI CQ
parent 508e20f92b
commit 121eeedc14

View File

@ -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.