Explicitly connect to MongoDB synchronously instead of on the first operation.
(self)
| 1031 | return opts |
| 1032 | |
| 1033 | def _connect(self) -> None: |
| 1034 | """Explicitly connect to MongoDB synchronously instead of on the first operation.""" |
| 1035 | self._get_topology() |
| 1036 | |
| 1037 | def _init_background(self, old_pid: Optional[int] = None) -> None: |
| 1038 | self._topology = Topology(self._topology_settings) |