Return ``True`` if the connection is closed, ``False`` otherwise. :return bool: ``True`` if the connection is closed, ``False`` otherwise.
(self)
| 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. |