MCPcopy
hub / github.com/tornadoweb/tornado / start_pinging

Method start_pinging

tornado/websocket.py:1339–1347  ·  view source on GitHub ↗

Start sending periodic pings to keep the connection alive

(self)

Source from the content-addressed store, hash-verified

1337 return self.ping_interval
1338
1339 def start_pinging(self) -> None:
1340 """Start sending periodic pings to keep the connection alive"""
1341 if (
1342 # prevent multiple ping coroutines being run in parallel
1343 not self._ping_coroutine
1344 # only run the ping coroutine if a ping interval is configured
1345 and self.ping_interval > 0
1346 ):
1347 self._ping_coroutine = asyncio.create_task(self.periodic_ping())
1348
1349 @staticmethod
1350 def ping_sleep_time(*, last_ping_time: float, interval: float, now: float) -> float:

Callers 1

_accept_connectionMethod · 0.95

Calls 1

periodic_pingMethod · 0.95

Tested by

no test coverage detected