Instantly aborts the WebSocket connection by closing the socket
(self)
| 672 | self._abort() |
| 673 | |
| 674 | def _abort(self) -> None: |
| 675 | """Instantly aborts the WebSocket connection by closing the socket""" |
| 676 | self.client_terminated = True |
| 677 | self.server_terminated = True |
| 678 | if self.stream is not None: |
| 679 | self.stream.close() # forcibly tear down the connection |
| 680 | self.close() # let the subclass cleanup |
| 681 | |
| 682 | @abc.abstractmethod |
| 683 | def close(self, code: Optional[int] = None, reason: Optional[str] = None) -> None: |
no test coverage detected