mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-08 10:31:50 -05:00
test: fix test abort for high timeout values (and --timeout-factor 0
)
This commit is contained in:
parent
e191fac4f3
commit
14302a4802
1 changed files with 4 additions and 1 deletions
|
@ -78,7 +78,10 @@ class AuthServiceProxy():
|
||||||
passwd = None if self.__url.password is None else self.__url.password.encode('utf8')
|
passwd = None if self.__url.password is None else self.__url.password.encode('utf8')
|
||||||
authpair = user + b':' + passwd
|
authpair = user + b':' + passwd
|
||||||
self.__auth_header = b'Basic ' + base64.b64encode(authpair)
|
self.__auth_header = b'Basic ' + base64.b64encode(authpair)
|
||||||
self.timeout = timeout
|
# clamp the socket timeout, since larger values can cause an
|
||||||
|
# "Invalid argument" exception in Python's HTTP(S) client
|
||||||
|
# library on some operating systems (e.g. OpenBSD, FreeBSD)
|
||||||
|
self.timeout = min(timeout, 2147483)
|
||||||
self._set_conn(connection)
|
self._set_conn(connection)
|
||||||
|
|
||||||
def __getattr__(self, name):
|
def __getattr__(self, name):
|
||||||
|
|
Loading…
Add table
Reference in a new issue