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