Merge pull request #2450 from FiveBellsSettlement/btc-client-correct-dialcontext

rpcclient: ensure http dial respects timeout
This commit is contained in:
Olaoluwa Osuntokun 2025-11-05 17:07:55 -08:00 committed by GitHub
commit 9ff0780da6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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(),
)