From b2b77c70eae9f7d1c85ce73f3f30f417be738893 Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Fri, 26 Apr 2024 16:00:17 +0200 Subject: [PATCH] SecopClient.__del__ must not call callbacks otherwise a nasty deadlock might happen in NICOS Change-Id: Ie1a333979b77683ce35683aede042ce86159fe65 Reviewed-on: https://forge.frm2.tum.de/review/c/secop/frappy/+/33583 Tested-by: Jenkins Automated Tests Reviewed-by: Markus Zolliker --- frappy/client/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frappy/client/__init__.py b/frappy/client/__init__.py index e5e437a..4c076c2 100644 --- a/frappy/client/__init__.py +++ b/frappy/client/__init__.py @@ -318,7 +318,8 @@ class SecopClient(ProxyClient): def __del__(self): try: - self.disconnect() + self.callbacks.clear() # avoid callbacks when deleting. may cause deadlocks in NICOS + self.disconnect(True) except Exception: pass