From ddfa14a8d623932996191bca6e19252e6dcca87a Mon Sep 17 00:00:00 2001 From: fjetter Date: Tue, 15 Aug 2023 14:55:41 +0200 Subject: [PATCH] Uncancel task in connectionpool --- distributed/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/distributed/core.py b/distributed/core.py index df6d3cb8e99..ccc8da09e34 100644 --- a/distributed/core.py +++ b/distributed/core.py @@ -1544,6 +1544,8 @@ async def _connect(self, addr: str, timeout: float | None = None) -> Comm: self._connecting_count -= 1 except asyncio.CancelledError: current_task = asyncio.current_task() + if sys.version_info >= (3, 11): + current_task.uncancel() assert current_task reason = self._reasons.pop(current_task, "ConnectionPool closing.") raise CommClosedError(reason)