Start sending periodic pings to keep the connection alive
(self)
| 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: |
no test coverage detected