tnetwork/util: increase default timeout of make_aiohttp_session (30->45s) - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 2d57a689d9bcf36799e1bfb9aa21bcd6a6d048a1 (DIR) parent 96fa03c11bdc80c7a3313607ab4131fc387f343e (HTM) Author: SomberNight <somber.night@protonmail.com> Date: Wed, 1 Jan 2020 06:21:20 +0100 network/util: increase default timeout of make_aiohttp_session (30->45s) related: #5337 Diffstat: M electrum/util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- (DIR) diff --git a/electrum/util.py b/electrum/util.py t@@ -1044,7 +1044,9 @@ def make_aiohttp_session(proxy: Optional[dict], headers=None, timeout=None): if headers is None: headers = {'User-Agent': 'Electrum'} 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)): timeout = aiohttp.ClientTimeout(total=timeout) ssl_context = ssl.create_default_context(purpose=ssl.Purpose.SERVER_AUTH, cafile=ca_path)