mirror of
https://github.com/cloudflare/cloudflared.git
synced 2026-08-07 07:14:57 +00:00
Revert "TUN-10621: Propagate max wait timeout"
This reverts merge request !1859
This commit is contained in:
committed by
João "Pisco" Fernandes
parent
86fccede6d
commit
43bfec0bcd
+3
-4
@@ -256,7 +256,7 @@ func (p *Proxy) proxyHTTPRequest(
|
||||
reader: tr.Body,
|
||||
}
|
||||
|
||||
stream.Pipe(eyeballStream, rwc, time.Second*0, logger)
|
||||
stream.Pipe(eyeballStream, rwc, logger)
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -311,7 +311,7 @@ func (p *Proxy) proxyStream(
|
||||
|
||||
// proxyTCPStream proxies private network type TCP connections as a stream towards an available origin.
|
||||
//
|
||||
// This is different from proxyStream because it's not leveraged ingress rule services and uses the
|
||||
// This is different than proxyStream because it's not leveraged ingress rule services and uses the
|
||||
// originDialer from OriginDialerService.
|
||||
func (p *Proxy) proxyTCPStream(
|
||||
tr *tracing.TracedContext,
|
||||
@@ -344,8 +344,7 @@ func (p *Proxy) proxyTCPStream(
|
||||
connectLatency.Observe(float64(time.Since(start).Milliseconds()))
|
||||
logger.Debug().Msg("proxy stream acknowledged")
|
||||
|
||||
stream.Pipe(tunnelConn, originConn, stream.DefaultTimeoutAfterFirstClose, logger)
|
||||
|
||||
stream.Pipe(tunnelConn, originConn, logger)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
+8
-10
@@ -223,9 +223,9 @@ func testProxyWebsocket(proxy connection.OriginProxy) func(t *testing.T) {
|
||||
}
|
||||
if ctx.Err() == context.DeadlineExceeded {
|
||||
t.Errorf("Test timed out")
|
||||
_ = readPipe.Close()
|
||||
_ = writePipe.Close()
|
||||
_ = responseWriter.Close()
|
||||
readPipe.Close()
|
||||
writePipe.Close()
|
||||
responseWriter.Close()
|
||||
}
|
||||
return nil
|
||||
})
|
||||
@@ -647,7 +647,7 @@ func TestConnections(t *testing.T) {
|
||||
ingressServiceScheme: "tcp://",
|
||||
originService: func(t *testing.T, ln net.Listener) {
|
||||
// closing the listener created by the test.
|
||||
_ = ln.Close()
|
||||
ln.Close()
|
||||
},
|
||||
eyeballResponseWriter: newTCPRespWriter(replayer),
|
||||
eyeballRequestBody: newTCPRequestBody([]byte("test2")),
|
||||
@@ -756,8 +756,6 @@ func newTCPRequestBody(data []byte) *requestBody {
|
||||
pr, pw := io.Pipe()
|
||||
go func() {
|
||||
_, _ = pw.Write(data)
|
||||
// Close the write side once the payload has been sent.
|
||||
_ = pw.Close()
|
||||
}()
|
||||
return &requestBody{
|
||||
pr: pr,
|
||||
@@ -803,8 +801,8 @@ func (p *pipedRequestBody) roundtrip(addr string) []byte {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer func() { _ = conn.Close() }()
|
||||
defer func() { _ = resp.Body.Close() }()
|
||||
defer conn.Close()
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusSwitchingProtocols {
|
||||
panic(fmt.Errorf("resp returned status code: %d", resp.StatusCode))
|
||||
@@ -951,7 +949,7 @@ func runEchoTCPService(t *testing.T, l net.Listener) {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
defer func() { _ = conn.Close() }()
|
||||
defer conn.Close()
|
||||
|
||||
for {
|
||||
buf := make([]byte, 1024)
|
||||
@@ -989,7 +987,7 @@ func runEchoWSService(t *testing.T, l net.Listener) {
|
||||
t.Log(err)
|
||||
return
|
||||
}
|
||||
defer func() { _ = conn.Close() }()
|
||||
defer conn.Close()
|
||||
|
||||
for {
|
||||
messageType, p, err := conn.ReadMessage()
|
||||
|
||||
Reference in New Issue
Block a user