(self)
| 578 | self.on_error(response) |
| 579 | |
| 580 | def cancel(self): |
| 581 | try: |
| 582 | log.debug("Canceling paging session %s from %s", self.stream_id, self.connection.host) |
| 583 | with self.connection.lock: |
| 584 | self.connection.send_msg(ReviseRequestMessage(ReviseRequestMessage.RevisionType.PAGING_CANCEL, |
| 585 | self.stream_id), |
| 586 | self.connection.get_request_id(), |
| 587 | self._on_cancel_response) |
| 588 | except ConnectionShutdown: |
| 589 | log.debug("Failed to cancel session %s from %s, connection is shutdown", |
| 590 | self.stream_id, self.connection.host) |
| 591 | |
| 592 | with self._condition: |
| 593 | self._stop = True |
| 594 | self._condition.notify() |
| 595 | |
| 596 | def _on_cancel_response(self, response): |
| 597 | if isinstance(response, ResultMessage): |
nothing calls this directly
no test coverage detected