Revert "TUN-6617: Dont fallback to http2 if QUIC conn was successful."

This reverts commit 679a89c7df.
This commit is contained in:
Sudarsan Reddy
2022-08-11 20:27:22 +01:00
parent 68d370af19
commit d3fd581b7b
11 changed files with 87 additions and 133 deletions

View File

@@ -26,7 +26,6 @@ import (
"github.com/cloudflare/cloudflared/signal"
"github.com/cloudflare/cloudflared/tunnelrpc"
tunnelpogs "github.com/cloudflare/cloudflared/tunnelrpc/pogs"
"github.com/cloudflare/cloudflared/tunnelstate"
)
const (
@@ -191,7 +190,6 @@ type EdgeTunnelServer struct {
edgeAddrs *edgediscovery.Edge
reconnectCh chan ReconnectSignal
gracefulShutdownC <-chan struct{}
tracker *tunnelstate.ConnTracker
connAwareLogger *ConnAwareLogger
}
@@ -274,12 +272,6 @@ func (e EdgeTunnelServer) Serve(ctx context.Context, connIndex uint8, protocolFa
return err
}
// If a single connection has connected with the current protocol, we know we know we don't have to fallback
// to a different protocol.
if e.tracker.HasConnectedWith(e.config.ProtocolSelector.Current()) {
return err
}
if !selectNextProtocol(
connLog.Logger(),
protocolFallback,
@@ -469,7 +461,6 @@ func serveTunnel(
nil,
gracefulShutdownC,
config.GracePeriod,
protocol,
)
switch protocol {