Skip to content

Commit

Permalink
fix: downgrade urllib3 version to support openSSL in workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjanrak committed Feb 7, 2024
1 parent 9cb66b1 commit a16615e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions dev_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ responses>=0.12.1
pytest-cov>=2.10.1
flake8>=3.8.4, <= 4.0.1
mock>=3.0.5
urllib3<2.0
4 changes: 0 additions & 4 deletions kiteconnect/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -107,14 +106,11 @@ 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)

# Call self after X seconds
self._next_ping = self.factory.reactor.callLater(self.PING_INTERVAL, self._loop_ping)
Expand Down

0 comments on commit a16615e

Please sign in to comment.