Browse Source

network: allow longer timeouts in _run_new_interface

On Windows box with weird networking setup (VPN, no IPv6, many DNS nameservers
but only some working well), the previous timeouts were too low: they were
reached due to DNS resolution.

related: #4421
regtest_lnd
SomberNight 6 years ago
parent
commit
1110f13c62
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/network.py

3
electrum/network.py

@ -734,7 +734,8 @@ class Network(PrintError):
@log_exceptions
async def _run_new_interface(self, server):
interface = Interface(self, server, self.proxy)
timeout = self.get_network_timeout_seconds(NetworkTimeout.Urgent)
# note: using longer timeouts here as DNS can sometimes be slow!
timeout = self.get_network_timeout_seconds(NetworkTimeout.Generic)
try:
await asyncio.wait_for(interface.ready, timeout)
except BaseException as e:

Loading…
Cancel
Save