diff --git a/mmgen/cfg.py b/mmgen/cfg.py index 25b186d4..5434900f 100755 --- a/mmgen/cfg.py +++ b/mmgen/cfg.py @@ -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 diff --git a/mmgen/http.py b/mmgen/http.py index 68b5a50c..c61ff086 100755 --- a/mmgen/http.py +++ b/mmgen/http.py @@ -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 diff --git a/mmgen/opts.py b/mmgen/opts.py index 36f4499c..2485a10c 100755 --- a/mmgen/opts.py +++ b/mmgen/opts.py @@ -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 diff --git a/mmgen/rpc/local.py b/mmgen/rpc/local.py index 79aca072..99e3cdd0 100755 --- a/mmgen/rpc/local.py +++ b/mmgen/rpc/local.py @@ -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):