From 3b1ece4c7000ba4132e0b737f15de0cd9abb8bea Mon Sep 17 00:00:00 2001 From: SomberNight Date: Mon, 18 Mar 2019 21:34:01 +0100 Subject: [PATCH] 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". --- electrum/interface.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/electrum/interface.py b/electrum/interface.py index 749928d7a..664062f47 100644 --- a/electrum/interface.py +++ b/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