MCPcopy
hub / github.com/MagicStack/asyncpg / is_closed

Method is_closed

asyncpg/connection.py:1494–1500  ·  view source on GitHub ↗

Return ``True`` if the connection is closed, ``False`` otherwise. :return bool: ``True`` if the connection is closed, ``False`` otherwise.

(self)

Source from the content-addressed store, hash-verified

1492 self._drop_local_statement_cache()
1493
1494 def is_closed(self):
1495 """Return ``True`` if the connection is closed, ``False`` otherwise.
1496
1497 :return bool: ``True`` if the connection is closed, ``False``
1498 otherwise.
1499 """
1500 return self._aborted or not self._protocol.is_connected()
1501
1502 async def close(self, *, timeout=None):
1503 """Close the connection gracefully.

Calls 1

is_connectedMethod · 0.80