From a65b97d25c3e37c0e77484f1846e537f9d5be274 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Thu, 10 Mar 2022 14:56:46 +0100 Subject: [PATCH] lnpeer: raise GracefulDisconnect in wait_for_message --- electrum/lnpeer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py index 16c2a09cb..b0aaa7d74 100644 --- a/electrum/lnpeer.py +++ b/electrum/lnpeer.py @@ -314,7 +314,7 @@ class Peer(Logger): q = self.ordered_message_queues[channel_id] name, payload = await asyncio.wait_for(q.get(), LN_P2P_NETWORK_TIMEOUT) if name is None: - return + raise GracefulDisconnect if name != expected_name: raise Exception(f"Received unexpected '{name}'") return payload