mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Fix: gRPC & HTTP/2 dialer (#445)
This commit is contained in:
parent
b63049f404
commit
3ed14c2fcd
2 changed files with 15 additions and 12 deletions
|
@ -21,6 +21,7 @@ import (
|
|||
type dialerConf struct {
|
||||
net.Destination
|
||||
*internet.SocketConfig
|
||||
*tls.Config
|
||||
}
|
||||
|
||||
var (
|
||||
|
@ -36,7 +37,7 @@ func getHTTPClient(ctx context.Context, dest net.Destination, tlsSettings *tls.C
|
|||
globalDialerMap = make(map[dialerConf]*http.Client)
|
||||
}
|
||||
|
||||
if client, found := globalDialerMap[dialerConf{dest, sockopt}]; found {
|
||||
if client, found := globalDialerMap[dialerConf{dest, sockopt, tlsSettings}]; found {
|
||||
return client, nil
|
||||
}
|
||||
|
||||
|
@ -92,7 +93,7 @@ func getHTTPClient(ctx context.Context, dest net.Destination, tlsSettings *tls.C
|
|||
Transport: transport,
|
||||
}
|
||||
|
||||
globalDialerMap[dialerConf{dest, sockopt}] = client
|
||||
globalDialerMap[dialerConf{dest, sockopt, tlsSettings}] = client
|
||||
return client, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue