Skip to content

Commit 2e39101

Browse files
authored
PYTHON-4347 Ensure client can be opened after fork() (#1682)
1 parent e059fde commit 2e39101

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pymongo/mongo_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -904,6 +904,7 @@ def target() -> bool:
904904
# this closure. When the client is freed, stop the executor soon.
905905
self_ref: Any = weakref.ref(self, executor.close)
906906
self._kill_cursors_executor = executor
907+
self._opened = False
907908

908909
def _after_fork(self) -> None:
909910
"""Resets topology in a child after successfully forking."""

0 commit comments

Comments
 (0)