Instantly aborts the WebSocket connection by closing the socket
(self)
| 648 | self._abort() |
| 649 | |
| 650 | def _abort(self) -> None: |
| 651 | """Instantly aborts the WebSocket connection by closing the socket""" |
| 652 | self.client_terminated = True |
| 653 | self.server_terminated = True |
| 654 | if self.stream is not None: |
| 655 | self.stream.close() # forcibly tear down the connection |
| 656 | self.close() # let the subclass cleanup |
| 657 | |
| 658 | @abc.abstractmethod |
| 659 | def close(self, code: Optional[int] = None, reason: Optional[str] = None) -> None: |
no test coverage detected