Browse Source

lnpeer: raise GracefulDisconnect in wait_for_message

patch-4
ThomasV 3 years ago
parent
commit
a65b97d25c
  1. 2
      electrum/lnpeer.py

2
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

Loading…
Cancel
Save