From a4eedb3210b392cc7efb7429dfa27b78b71b4021 Mon Sep 17 00:00:00 2001 From: Noah Stapp Date: Tue, 21 Jan 2025 16:54:34 -0500 Subject: [PATCH] Remove task cancelling from AsyncPeriodicExecutor.close --- pymongo/periodic_executor.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pymongo/periodic_executor.py b/pymongo/periodic_executor.py index f51a988728..9b10f6e7e3 100644 --- a/pymongo/periodic_executor.py +++ b/pymongo/periodic_executor.py @@ -75,8 +75,6 @@ def close(self, dummy: Any = None) -> None: callback; see monitor.py. """ self._stopped = True - if self._task is not None: - self._task.cancel() async def join(self, timeout: Optional[int] = None) -> None: if self._task is not None: