From af6bf5c4e5bd06c9bdcaf8861253bfa81347cebb Mon Sep 17 00:00:00 2001 From: Devin Carr Date: Thu, 25 Aug 2022 12:01:16 -0700 Subject: [PATCH] TUN-6704: Honor protocol flag when edge discovery is unreachable --- connection/protocol.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connection/protocol.go b/connection/protocol.go index ce97bffc..b8b7d5ce 100644 --- a/connection/protocol.go +++ b/connection/protocol.go @@ -209,8 +209,8 @@ func NewProtocolSelector( threshold := switchThreshold(namedTunnel.Credentials.AccountTag) fetchedProtocol, err := getProtocol([]Protocol{QUIC, HTTP2}, fetchFunc, threshold) - if err != nil { - log.Err(err).Msg("Unable to lookup protocol. Defaulting to `http2`. If this fails, you can set `--protocol h2mux` in your cloudflared command.") + if err != nil && protocolFlag == "auto" { + log.Err(err).Msg("Unable to lookup protocol. Defaulting to `http2`. If this fails, you can attempt `--protocol quic` instead.") return &staticProtocolSelector{ current: HTTP2, }, nil