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

Method _close_conn

pymongo/asynchronous/pool.py:566–577  ·  view source on GitHub ↗

Close this connection.

(self)

Source from the content-addressed store, hash-verified

564 )
565
566 async def _close_conn(self) -> None:
567 """Close this connection."""
568 if self.closed:
569 return
570 self.closed = True
571 self.cancel_context.cancel()
572 # Note: We catch exceptions to avoid spurious errors on interpreter
573 # shutdown.
574 try:
575 await self.conn.close()
576 except Exception: # noqa: S110
577 pass
578
579 def conn_closed(self) -> bool:
580 """Return True if we know socket has been closed, False otherwise."""

Callers 1

close_connMethod · 0.95

Calls 2

cancelMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected