From 4208876ef3ce8ec6c3cfdcf3637f9fe2a95c4d0b Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Mon, 9 Dec 2019 06:51:30 -0300 Subject: [PATCH] add header sync to update tasks so it can be cancelled --- torba/torba/client/baseledger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torba/torba/client/baseledger.py b/torba/torba/client/baseledger.py index 922fb2021..d00c14895 100644 --- a/torba/torba/client/baseledger.py +++ b/torba/torba/client/baseledger.py @@ -289,7 +289,7 @@ class BaseLedger(metaclass=LedgerRegistry): asyncio.ensure_future(self.network.start()) await first_connection async with self._header_processing_lock: - await self.initial_headers_sync() + await self._update_tasks.add(self.initial_headers_sync()) await self.join_network() self.network.on_connected.listen(self.join_network)