Skip to content
Snippets Groups Projects
Commit 901fa77b authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

client set to terminate itself

parent 792a8ab2
No related branches found
No related tags found
No related merge requests found
...@@ -119,9 +119,9 @@ def run(client_notify, result_client, server_notify, server_result): ...@@ -119,9 +119,9 @@ def run(client_notify, result_client, server_notify, server_result):
client_notify.get() client_notify.get()
cad.start() cad.start()
started_at = time.monotonic()
terminating = False terminating = False
while not terminating: while not terminating and (time.monotonic() < started_at + 40): # run for 40 seconds
try: try:
client_notify.get(timeout=1.0) client_notify.get(timeout=1.0)
terminating = True terminating = True
...@@ -130,5 +130,7 @@ def run(client_notify, result_client, server_notify, server_result): ...@@ -130,5 +130,7 @@ def run(client_notify, result_client, server_notify, server_result):
except KeyboardInterrupt: except KeyboardInterrupt:
break break
server_notify.put(None)
lftf.close() lftf.close()
# logger.warning('Got %s connections', len(cad.connections)) # logger.warning('Got %s connections', len(cad.connections))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment