From 46ce175481773004bb34f7c766b29fda3a8ad489 Mon Sep 17 00:00:00 2001 From: Jack Robison Date: Tue, 1 Feb 2022 13:01:10 -0500 Subject: [PATCH] fix tests --- lbry/wallet/server/chain_reader.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lbry/wallet/server/chain_reader.py b/lbry/wallet/server/chain_reader.py index 2fefb48d8..9c7bcab2e 100644 --- a/lbry/wallet/server/chain_reader.py +++ b/lbry/wallet/server/chain_reader.py @@ -214,9 +214,10 @@ class BlockchainReaderServer(BlockchainReader): async def stop(self): self.status_server.stop() async with self._lock: - for task in reversed(self.cancellable_tasks): - task.cancel() - await asyncio.wait(self.cancellable_tasks) + while self.cancellable_tasks: + t = self.cancellable_tasks.pop() + if not t.done(): + t.cancel() self.session_manager.search_index.stop() self.db.close() if self.prometheus_server: