1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-05 00:12:49 +01:00

fix: don't wait forever

This commit is contained in:
2025-11-28 14:10:51 +01:00
committed by wyzula-jan
parent a00024c66f
commit afc8c4733e

View File

@@ -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
):