From 72d735c306e854539f8bee5eda903f9634426d41 Mon Sep 17 00:00:00 2001 From: Jean-Marie Burel Date: Fri, 1 Mar 2024 21:46:28 +0000 Subject: [PATCH] do not close session associated to client --- src/omero/gateway/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/omero/gateway/__init__.py b/src/omero/gateway/__init__.py index da42cb4b2..a955c2214 100644 --- a/src/omero/gateway/__init__.py +++ b/src/omero/gateway/__init__.py @@ -2092,8 +2092,14 @@ def _resetOmeroClient(self): logger.debug(self.ice_config) if self.c is not None: - self.c.__del__() - self.c = None + try: + if self.c.getSessionId() != self._sessionUuid: + self.c.__del__() + self.c = None + except omero.ClientError: # no session available + self.c.__del__() + self.c = None + pass if self.host is not None: if self.port is not None: