Resets topology in a child after successfully forking.
(self)
| 1082 | return self._options.load_balanced and not (session and session.in_transaction) |
| 1083 | |
| 1084 | def _after_fork(self) -> None: |
| 1085 | """Resets topology in a child after successfully forking.""" |
| 1086 | self._init_background(self._topology._pid) |
| 1087 | # Reset the session pool to avoid duplicate sessions in the child process. |
| 1088 | self._topology._session_pool.reset() |
| 1089 | |
| 1090 | def _duplicate(self, **kwargs: Any) -> MongoClient: # type: ignore[type-arg] |
| 1091 | args = self._init_kwargs.copy() |
no test coverage detected