From afc8c4733ec057cf1e142d399b314823f33c4557 Mon Sep 17 00:00:00 2001 From: David Perl Date: Fri, 28 Nov 2025 14:10:51 +0100 Subject: [PATCH] fix: don't wait forever --- bec_widgets/cli/client_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bec_widgets/cli/client_utils.py b/bec_widgets/cli/client_utils.py index bdcbd05f..622becc6 100644 --- a/bec_widgets/cli/client_utils.py +++ b/bec_widgets/cli/client_utils.py @@ -392,7 +392,8 @@ class BECGuiClient(RPCBase): timeout = 60 # Wait for 'bec' gui to be registered, this may take some time # After 60s timeout. Should this raise an exception on timeout? - while time.time() < time.time() + timeout: + start = time.monotonic() + while time.monotonic() < start + timeout: if len(list(self._server_registry.keys())) < 2 or not hasattr( self, self._anchor_widget ):