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

@@ -2,7 +2,6 @@ package connection
import (
"context"
"fmt"
"io"
"net"
"time"
@@ -22,7 +21,6 @@ type controlStream struct {
namedTunnelProperties *NamedTunnelProperties
connIndex uint8
edgeAddress net.IP
protocol Protocol
newRPCClientFunc RPCClientFunc
@@ -53,7 +51,6 @@ func NewControlStream(
newRPCClientFunc RPCClientFunc,
gracefulShutdownC <-chan struct{},
gracePeriod time.Duration,
protocol Protocol,
) ControlStreamHandler {
if newRPCClientFunc == nil {
newRPCClientFunc = newRegistrationRPCClient
@@ -67,7 +64,6 @@ func NewControlStream(
edgeAddress: edgeAddress,
gracefulShutdownC: gracefulShutdownC,
gracePeriod: gracePeriod,
protocol: protocol,
}
}
@@ -84,9 +80,6 @@ func (c *controlStream) ServeControlStream(
rpcClient.Close()
return err
}
c.observer.logServerInfo(c.connIndex, registrationDetails.Location, c.edgeAddress, fmt.Sprintf("Connection %s registered", registrationDetails.UUID))
c.observer.sendConnectedEvent(c.connIndex, c.protocol, registrationDetails.Location)
c.connectedFuse.Connected()
// if conn index is 0 and tunnel is not remotely managed, then send local ingress rules configuration