(self, connection, owner)
| 1652 | |
| 1653 | class HeartbeatFuture(object): |
| 1654 | def __init__(self, connection, owner): |
| 1655 | self._exception = None |
| 1656 | self._event = Event() |
| 1657 | self.connection = connection |
| 1658 | self.owner = owner |
| 1659 | log.debug("Sending options message heartbeat on idle connection (%s) %s", |
| 1660 | id(connection), connection.endpoint) |
| 1661 | with connection.lock: |
| 1662 | if connection.in_flight < connection.max_request_id: |
| 1663 | connection.in_flight += 1 |
| 1664 | connection.send_msg(OptionsMessage(), connection.get_request_id(), self._options_callback) |
| 1665 | else: |
| 1666 | self._exception = Exception("Failed to send heartbeat because connection 'in_flight' exceeds threshold") |
| 1667 | self._event.set() |
| 1668 | |
| 1669 | def wait(self, timeout): |
| 1670 | self._event.wait(timeout) |
nothing calls this directly
no test coverage detected