TUN-6704: Honor protocol flag when edge discovery is unreachable
This commit is contained in:
parent
e3390fcb15
commit
af6bf5c4e5
|
@ -209,8 +209,8 @@ func NewProtocolSelector(
|
||||||
|
|
||||||
threshold := switchThreshold(namedTunnel.Credentials.AccountTag)
|
threshold := switchThreshold(namedTunnel.Credentials.AccountTag)
|
||||||
fetchedProtocol, err := getProtocol([]Protocol{QUIC, HTTP2}, fetchFunc, threshold)
|
fetchedProtocol, err := getProtocol([]Protocol{QUIC, HTTP2}, fetchFunc, threshold)
|
||||||
if err != nil {
|
if err != nil && protocolFlag == "auto" {
|
||||||
log.Err(err).Msg("Unable to lookup protocol. Defaulting to `http2`. If this fails, you can set `--protocol h2mux` in your cloudflared command.")
|
log.Err(err).Msg("Unable to lookup protocol. Defaulting to `http2`. If this fails, you can attempt `--protocol quic` instead.")
|
||||||
return &staticProtocolSelector{
|
return &staticProtocolSelector{
|
||||||
current: HTTP2,
|
current: HTTP2,
|
||||||
}, nil
|
}, nil
|
||||||
|
|
Loading…
Reference in New Issue