mirror of
https://github.com/btcsuite/btcd.git
synced 2026-08-14 12:42:51 +02:00
Merge pull request #2450 from FiveBellsSettlement/btc-client-correct-dialcontext
rpcclient: ensure http dial respects timeout
This commit is contained in:
commit
9ff0780da6
1 changed files with 4 additions and 3 deletions
|
|
@ -1356,10 +1356,11 @@ func newHTTPClient(config *ConnConfig) (*http.Client, error) {
|
|||
Transport: &http.Transport{
|
||||
Proxy: proxyFunc,
|
||||
TLSClientConfig: tlsConfig,
|
||||
DialContext: func(_ context.Context, _,
|
||||
DialContext: func(ctx context.Context, _,
|
||||
_ string) (net.Conn, error) {
|
||||
|
||||
return net.Dial(
|
||||
d := &net.Dialer{}
|
||||
return d.DialContext(
|
||||
ctx,
|
||||
parsedDialAddr.Network(),
|
||||
parsedDialAddr.String(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue