MCPcopy Create free account
hub / github.com/MagicStack/asyncpg / is_closed

Method is_closed

asyncpg/connection.py:1517–1523  ·  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

1515 self._drop_local_statement_cache()
1516
1517 def is_closed(self):
1518 """Return ``True`` if the connection is closed, ``False`` otherwise.
1519
1520 :return bool: ``True`` if the connection is closed, ``False``
1521 otherwise.
1522 """
1523 return self._aborted or not self._protocol.is_connected()
1524
1525 async def close(self, *, timeout=None):
1526 """Close the connection gracefully.

Calls 1

is_connectedMethod · 0.80