From 7b721e1a6f8d0dc678cd87084d5564baab289496 Mon Sep 17 00:00:00 2001 From: Shelikhoo Date: Sun, 9 May 2021 15:14:28 +0100 Subject: [PATCH] support chain proxy for h2 --- 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 df3ab1427..3f018021a 100644 --- a/transport/internet/http/dialer.go +++ b/transport/internet/http/dialer.go @@ -24,7 +24,7 @@ var ( globalDialerAccess sync.Mutex ) -func getHTTPClient(_ context.Context, dest net.Destination, tlsSettings *tls.Config) *http.Client { +func getHTTPClient(ctx context.Context, dest net.Destination, tlsSettings *tls.Config) *http.Client { globalDialerAccess.Lock() defer globalDialerAccess.Unlock() @@ -51,7 +51,7 @@ func getHTTPClient(_ context.Context, dest net.Destination, tlsSettings *tls.Con } address := net.ParseAddress(rawHost) - pconn, err := internet.DialSystem(context.Background(), net.TCPDestination(address, port), nil) + pconn, err := internet.DialSystem(ctx, net.TCPDestination(address, port), nil) if err != nil { return nil, err }