diff --git a/electrum/interface.py b/electrum/interface.py index 1d54be3d2..b5eac439c 100644 --- a/electrum/interface.py +++ b/electrum/interface.py @@ -336,7 +336,8 @@ class Interface(Logger): self.logger.debug(f"(disconnect) trace for {repr(e)}", exc_info=True) finally: await self.network.connection_down(self) - self.got_disconnected.set_result(1) + if not self.got_disconnected.done(): + self.got_disconnected.set_result(1) # if was not 'ready' yet, schedule waiting coroutines: self.ready.cancel() return wrapper_func