electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 6802bcb960bb4832b6a83b75aa62f46d3a248aee
parent a669c6b765410d41ce774cc346872325ffd5e6d7
Author: SomberNight <somber.night@protonmail.com>
Date:   Tue, 25 Aug 2020 16:57:10 +0200

windows dns hack: fix #6473

Diffstat:
Melectrum/dns_hacks.py | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/electrum/dns_hacks.py b/electrum/dns_hacks.py @@ -32,8 +32,12 @@ def configure_dns_depending_on_proxy(is_proxy: bool) -> None: # On Windows, socket.getaddrinfo takes a mutex, and might hold it for up to 10 seconds # when dns-resolving. To speed it up drastically, we resolve dns ourselves, outside that lock. # See https://github.com/spesmilo/electrum/issues/4421 - _prepare_windows_dns_hack() - socket.getaddrinfo = _fast_getaddrinfo + try: + _prepare_windows_dns_hack() + except Exception as e: + _logger.exception('failed to apply windows dns hack.') + else: + socket.getaddrinfo = _fast_getaddrinfo else: socket.getaddrinfo = socket._getaddrinfo