From 4bb740aeafda6a6b53337a6d6fefb2a38b593c1a Mon Sep 17 00:00:00 2001 From: shadeofblue Date: Wed, 21 Jun 2023 15:46:05 +0200 Subject: [PATCH] fix the agreement termination --- yapapi/agreements_pool.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yapapi/agreements_pool.py b/yapapi/agreements_pool.py index 17dc1465e..2b08be0e5 100644 --- a/yapapi/agreements_pool.py +++ b/yapapi/agreements_pool.py @@ -248,7 +248,7 @@ async def terminate_all(self, reason: dict) -> None: """Terminate all agreements.""" async with self._lock: - for agreement_id, agreement in self._agreements.items(): + for agreement_id in frozenset(self._agreements): await self._terminate_agreement(agreement_id, reason) async def on_agreement_terminated(self, agr_id: str, reason: dict) -> None: