From 7e5ebf0484ceefc16420b5ac5951ac96e245084f Mon Sep 17 00:00:00 2001 From: Sander van Grieken Date: Fri, 10 Mar 2023 15:27:39 +0100 Subject: [PATCH] swap: wrap coros in tasks (req since python3.11) --- electrum/submarine_swaps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum/submarine_swaps.py b/electrum/submarine_swaps.py index 0d86207da..d1c653ca3 100644 --- a/electrum/submarine_swaps.py +++ b/electrum/submarine_swaps.py @@ -453,7 +453,7 @@ class SwapManager(Logger): while swap.spending_txid is None: await asyncio.sleep(1) # initiate main payment - tasks = [self.lnworker.pay_invoice(invoice, attempts=10, channels=channels), wait_for_funding(swap)] + tasks = [asyncio.create_task(self.lnworker.pay_invoice(invoice, attempts=10, channels=channels)), asyncio.create_task(wait_for_funding(swap))] await asyncio.wait(tasks, return_when=asyncio.FIRST_COMPLETED) success = swap.spending_txid is not None return success