send heartbeat while waiting for control to finish

This commit is contained in:
Simon Pirkelmann 2021-09-10 00:42:31 +02:00
parent 029068b259
commit 1c8d4a1d57

View File

@ -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()