HTTPClient: honor --http-timeout
This commit is contained in:
parent
9be29a0521
commit
5bc0977948
4 changed files with 4 additions and 4 deletions
|
|
@ -170,7 +170,7 @@ class Config(Lockable):
|
|||
no_license = False
|
||||
|
||||
# limits
|
||||
http_timeout = 60
|
||||
http_timeout = 0
|
||||
usr_randchars = 30
|
||||
fee_adjust = 1.0
|
||||
fee_estimate_confs = 3
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class HTTPClient:
|
|||
url = self.network_proto + '://' + self.host + path
|
||||
kwargs = {
|
||||
'url': url,
|
||||
'timeout': timeout or self.timeout,
|
||||
'timeout': self.cfg.http_timeout or timeout or self.timeout,
|
||||
'verify': self.verify}
|
||||
if data:
|
||||
kwargs['data'] = data
|
||||
|
|
|
|||
|
|
@ -301,7 +301,7 @@ class UserOpts(Opts):
|
|||
Rr --daemon-id=ID Specify the coin daemon ID
|
||||
rr --ignore-daemon-version Ignore coin daemon version check
|
||||
Rr --list-daemon-ids List all available daemon IDs
|
||||
rr --http-timeout=t Set HTTP timeout in seconds for JSON-RPC connections
|
||||
-r --http-timeout=t Set HTTP timeout in seconds for JSON-RPC connections
|
||||
-- --no-license Suppress the GPL license prompt
|
||||
Rr --rpc-host=HOST Communicate with coin daemon running on host HOST
|
||||
rr --rpc-port=PORT Communicate with coin daemon listening on port PORT
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class RPCClient:
|
|||
self.host_url = f'{self.network_proto}://{host}:{port}'
|
||||
self.host = host
|
||||
self.port = port
|
||||
self.timeout = self.cfg.http_timeout
|
||||
self.timeout = self.cfg.http_timeout or 60
|
||||
self.auth = None
|
||||
|
||||
def _get_backend(self, backend):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue