From 45dd87060b09932a3498566240eb5a635b40b21e Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Wed, 13 Sep 2023 17:22:58 +0200 Subject: [PATCH] improve client shutdown time in SecopClient.disconnect joinng the reconnect thread may take up to 10 s, because of the time.sleep(10) call in the reconnect thread. change the _shutdown attribute from bool to an Event, and use Event.wait instead of time.sleep Change-Id: Icea6a14ad73df0b3d26ef45806f4c05e6bf18492 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/32137 Tested-by: Jenkins Automated Tests Reviewed-by: Markus Zolliker --- frappy/client/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/frappy/client/__init__.py b/frappy/client/__init__.py index 7eb4160..0d4ddfc 100644 --- a/frappy/client/__init__.py +++ b/frappy/client/__init__.py @@ -261,7 +261,6 @@ class SecopClient(ProxyClient): """a general SECoP client""" reconnect_timeout = 10 _running = False - _shutdown = None _rxthread = None _txthread = None _connthread = None