From 6b4ef6948f6de57644c3fa2e89ce507b1ee267ec Mon Sep 17 00:00:00 2001 From: ziggie Date: Thu, 3 Oct 2024 00:45:54 +0200 Subject: [PATCH] fixup! rpcclient: add timeout for http request. --- rpcclient/infrastructure.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rpcclient/infrastructure.go b/rpcclient/infrastructure.go index 4ed2fe2669..155894aaa9 100644 --- a/rpcclient/infrastructure.go +++ b/rpcclient/infrastructure.go @@ -93,9 +93,9 @@ const ( // retries when sending HTTP POST requests. requestRetryInterval = time.Millisecond * 500 - // defaultHttpTimeout is the default timeout for an http request, so the - // request does not block indefintily. - defaultHttpTimeout = time.Second * 2 + // defaultHTTPTimeout is the default timeout for an http request, so the + // request does not block indefinitely. + defaultHTTPTimeout = time.Second * 10 ) // jsonRequest holds information about a json request that is used to properly @@ -1367,7 +1367,7 @@ func newHTTPClient(config *ConnConfig) (*http.Client, error) { return net.Dial(parsedAddr.Network(), parsedAddr.String()) }, }, - Timeout: defaultHttpTimeout, + Timeout: defaultHTTPTimeout, } return &client, nil