Skip to content

Commit af6bf5c

Browse files
committed
TUN-6704: Honor protocol flag when edge discovery is unreachable
1 parent e3390fc commit af6bf5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

connection/protocol.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ func NewProtocolSelector(
209209

210210
threshold := switchThreshold(namedTunnel.Credentials.AccountTag)
211211
fetchedProtocol, err := getProtocol([]Protocol{QUIC, HTTP2}, fetchFunc, threshold)
212-
if err != nil {
213-
log.Err(err).Msg("Unable to lookup protocol. Defaulting to `http2`. If this fails, you can set `--protocol h2mux` in your cloudflared command.")
212+
if err != nil && protocolFlag == "auto" {
213+
log.Err(err).Msg("Unable to lookup protocol. Defaulting to `http2`. If this fails, you can attempt `--protocol quic` instead.")
214214
return &staticProtocolSelector{
215215
current: HTTP2,
216216
}, nil

0 commit comments

Comments
 (0)