Close this connection.
(self)
| 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.""" |
no test coverage detected