Hello, I have noticed that I lose WebSocket connection sometimes. Documentation and the implementation seem to suggest that the connection should be established automatically. However, that didn't happen in my case. I am using all latest packages (e.g., ticker in kiteticker shows version 5.0.1). The error message that caused disconnect is: error code: 1006, reason: connection was closed uncleanly (peer dropped the TCP connection without previous WebSocket closing handshake) Is there a way to make Kite reconnect in such cases? I also notice that Kite ticker has '_loop_ping' method that is supposed to send ping periodically, but the method doesn't do that:
def _loop_ping(self): # noqa """Start a ping loop where it sends ping message every X seconds.""" if self.factory.debug: if self._last_ping_time: log.debug("last ping was {} seconds back.".format(time.time() - self._last_ping_time))
# Set current time as last ping time self._last_ping_time = time.time()
# Call self after X seconds self._next_ping = self.factory.reactor.callLater(self.PING_INTERVAL, self._loop_ping) In the above, there is no call to sendMessage to send ping. Is it possible that if pings are sent, the ticker may realize the dropped connection and it will then reconnect (automatically)?