File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,10 @@ func NewProtocolSelector(
172172
173173 http2Percentage , err := fetchFunc ()
174174 if err != nil {
175- return nil , err
175+ log .Err (err ).Msg ("Unable to lookup protocol. Defaulting to `http2`. If this fails, you can set `--protocol h2mux` in your cloudflared command." )
176+ return & staticProtocolSelector {
177+ current : HTTP2 ,
178+ }, nil
176179 }
177180 if protocolFlag == HTTP2 .String () {
178181 if http2Percentage < 0 {
Original file line number Diff line number Diff line change @@ -158,7 +158,8 @@ func TestNewProtocolSelector(t *testing.T) {
158158 protocol : "unknown" ,
159159 fetchFunc : mockFetcherWithError (),
160160 namedTunnelConfig : testNamedTunnelConfig ,
161- wantErr : true ,
161+ expectedProtocol : HTTP2 ,
162+ wantErr : false ,
162163 },
163164 }
164165
You can’t perform that action at this time.
0 commit comments