From 1c8d4a1d571ca701b5eb5d0ce8e751c176c3a551 Mon Sep 17 00:00:00 2001 From: Simon Pirkelmann Date: Fri, 10 Sep 2021 00:42:31 +0200 Subject: [PATCH] send heartbeat while waiting for control to finish --- remote_control/measurement_server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remote_control/measurement_server.py b/remote_control/measurement_server.py index 44f8e7d..8ac9b83 100644 --- a/remote_control/measurement_server.py +++ b/remote_control/measurement_server.py @@ -76,7 +76,8 @@ class MeasurementHandler(socketserver.BaseRequestHandler): # TODO this assumes that we wait only for at most one response at a time # we could add some kind of reference here to handle multiple responses (e.g. id of the response to wait for) while self.server.response_queue.empty(): - time.sleep(0.1) + time.sleep(0.2) + self.request.sendall(b'.\n') pass reply = self.server.response_queue.get()