diff --git a/connectrum/client.py b/connectrum/client.py index c799592..6da08fd 100644 --- a/connectrum/client.py +++ b/connectrum/client.py @@ -61,6 +61,11 @@ def _connection_lost(self, protocol): self.protocol = None logger.warn("Electrum server connection lost") + for (_, fut) in self.inflight.values(): + fut.set_exception(ElectrumErrorResponse("Electrum server connection lost")) + + self.inflight.clear() + # cleanup keep alive task if self.ka_task: self.ka_task.cancel()