Merge 446c8f581c into merged_master (Bitcoin PR bitcoin/bitcoin#25950)

This commit is contained in:
Byron Hambly 2025-04-07 10:29:44 +02:00
commit 83fd716cd8

View file

@ -78,7 +78,10 @@ class AuthServiceProxy():
passwd = None if self.__url.password is None else self.__url.password.encode('utf8')
authpair = user + b':' + passwd
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)
def __getattr__(self, name):