From 28d5d60ddf173e289c161a940f8afefee7c48d0f Mon Sep 17 00:00:00 2001 From: Arthur Golubtsov Date: Fri, 18 Oct 2019 00:53:44 +0100 Subject: [PATCH] Client: remove ping --- Drone/client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Drone/client.py b/Drone/client.py index ced54ad..aed8dc4 100644 --- a/Drone/client.py +++ b/Drone/client.py @@ -47,7 +47,7 @@ class Client(object): global active_client active_client = self - self._last_ping_time = 0 + # self._last_ping_time = 0 def load_config(self): self.config.read(self.config_path) @@ -190,9 +190,9 @@ class Client(object): def _process_connections(self): while True: events = self.selector.select(timeout=1) - if time.time() - self._last_ping_time > 5: - self.server_connection.send_message("ping") - self._last_ping_time = time.time() + # if time.time() - self._last_ping_time > 5: + # self.server_connection.send_message("ping") + # self._last_ping_time = time.time() # logging.debug("tick") for key, mask in events: # TODO add notifier to client! connection = key.data