From 4028a09e701c14c1fa6d98ad9e120f75466fec99 Mon Sep 17 00:00:00 2001 From: Loyalsoldier <10487845+Loyalsoldier@users.noreply.github.com> Date: Mon, 15 Mar 2021 16:57:33 +0800 Subject: [PATCH] Revert "Test: fix http2 dial timeout (#570)" (#778) * Revert "Test: fix http2 dial timeout (#570)" This reverts commit 405a051c50e032abc092d01f3a50adeeb585401d. * Feat: lower the payload size * Remove state.NegotiatedProtocolIsMutual It has been deprecated since Go 1.16 because it shouldn't be used: this value is always true. --- transport/internet/http/dialer.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/internet/http/dialer.go b/transport/internet/http/dialer.go index 08ae989bf..12884f648 100644 --- a/transport/internet/http/dialer.go +++ b/transport/internet/http/dialer.go @@ -24,7 +24,7 @@ var ( globalDialerAccess sync.Mutex ) -func getHTTPClient(ctx context.Context, dest net.Destination, tlsSettings *tls.Config) *http.Client { +func getHTTPClient(_ context.Context, dest net.Destination, tlsSettings *tls.Config) *http.Client { globalDialerAccess.Lock() defer globalDialerAccess.Unlock() @@ -51,7 +51,7 @@ func getHTTPClient(ctx context.Context, dest net.Destination, tlsSettings *tls.C } address := net.ParseAddress(rawHost) - pconn, err := internet.DialSystem(ctx, net.TCPDestination(address, port), nil) + pconn, err := internet.DialSystem(context.Background(), net.TCPDestination(address, port), nil) if err != nil { return nil, err }