network/util: increase default timeout of make_aiohttp_session (30->45s)
related: #5337
This commit is contained in:
@@ -1044,7 +1044,9 @@ def make_aiohttp_session(proxy: Optional[dict], headers=None, timeout=None):
|
|||||||
if headers is None:
|
if headers is None:
|
||||||
headers = {'User-Agent': 'Electrum'}
|
headers = {'User-Agent': 'Electrum'}
|
||||||
if timeout is None:
|
if timeout is None:
|
||||||
timeout = aiohttp.ClientTimeout(total=30)
|
# The default timeout is high intentionally.
|
||||||
|
# DNS on some systems can be really slow, see e.g. #5337
|
||||||
|
timeout = aiohttp.ClientTimeout(total=45)
|
||||||
elif isinstance(timeout, (int, float)):
|
elif isinstance(timeout, (int, float)):
|
||||||
timeout = aiohttp.ClientTimeout(total=timeout)
|
timeout = aiohttp.ClientTimeout(total=timeout)
|
||||||
ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=ca_path)
|
ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=ca_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user