From ce72bd73285a50b6ab1f9a3a6b20dbf5dfdeec78 Mon Sep 17 00:00:00 2001 From: Rakesh R Date: Wed, 7 Feb 2024 12:43:38 +0530 Subject: [PATCH] fix: remove ping text from sendPing instead of binary --- kiteconnect/ticker.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/kiteconnect/ticker.py b/kiteconnect/ticker.py index d906313e..74843ac2 100644 --- a/kiteconnect/ticker.py +++ b/kiteconnect/ticker.py @@ -32,7 +32,6 @@ class KiteTickerClientProtocol(WebSocketClientProtocol): PING_INTERVAL = 2.5 KEEPALIVE_INTERVAL = 5 - _ping_message = "" _next_ping = None _next_pong_check = None _last_pong_time = None @@ -107,14 +106,13 @@ def onPong(self, response): # noqa def _loop_ping(self): # noqa """Start a ping loop where it sends ping message every X seconds.""" if self.factory.debug: - log.debug("ping => {}".format(self._ping_message)) 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() # Send a ping message to server - self.sendPing(self._ping_message) + self.sendPing() # Call self after X seconds self._next_ping = self.factory.reactor.callLater(self.PING_INTERVAL, self._loop_ping)