1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 15:36:41 -05:00

Revert "Test: fix http2 dial timeout (#570)" (#778)

* Revert "Test: fix http2 dial timeout (#570)"

This reverts commit 405a051c50.

* 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.
This commit is contained in:
Loyalsoldier 2021-03-15 16:57:33 +08:00 committed by GitHub
parent fb9a5a136b
commit 4028a09e70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}