From fd0bbebbab5205540d0150302ce11e097d535235 Mon Sep 17 00:00:00 2001 From: BobTheBuidler <70677534+BobTheBuidler@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:47:17 -0400 Subject: [PATCH] fix: AddressTransactionLedger.__stop_workers --- eth_portfolio/_ledgers/address.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/eth_portfolio/_ledgers/address.py b/eth_portfolio/_ledgers/address.py index 512eeb37..2a4cf285 100644 --- a/eth_portfolio/_ledgers/address.py +++ b/eth_portfolio/_ledgers/address.py @@ -515,8 +515,10 @@ async def __worker_fn( def __stop_workers(self) -> None: logger.info("stopping workers for %s", self) - for _ in range(len(_workers)): - self._workers.pop().cancel() + workers = self._workers + pop_next = workers.pop + for _ in range(len(workers)): + pop_next().cancel() class InternalTransfersList(PandableList[InternalTransfer]):