MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / close

Method close

pymongo/asynchronous/monitor.py:201–206  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

199 ) # type: ignore[func-returns-value]
200
201 async def close(self) -> None:
202 self.gc_safe_close()
203 await self._rtt_monitor.close()
204 # Increment the generation and maybe close the socket. If the executor
205 # thread has the socket checked out, it will be closed when checked in.
206 await self._reset_connection()
207
208 async def _reset_connection(self) -> None:
209 # Clear our pooled connection.

Callers 5

_runMethod · 0.95
gc_safe_closeMethod · 0.45
_start_rtt_monitorMethod · 0.45
gc_safe_closeMethod · 0.45
_runMethod · 0.45

Calls 2

gc_safe_closeMethod · 0.95
_reset_connectionMethod · 0.95

Tested by

no test coverage detected