Browse Source

interface: if iface conn fails early, don't wait for timeout of 'ready'

Network code is waiting for iface.ready with a timeout.
While network.py code is waiting, the already failed iface takes up a slot
in "connecting".
regtest_lnd
SomberNight 6 years ago
parent
commit
3b1ece4c70
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/interface.py

2
electrum/interface.py

@ -299,6 +299,8 @@ class Interface(PrintError):
finally:
await self.network.connection_down(self)
self.got_disconnected.set_result(1)
# if was not 'ready' yet, schedule waiting coroutines:
self.ready.cancel()
return wrapper_func
@ignore_exceptions # do not kill main_taskgroup

Loading…
Cancel
Save