fix(jungfraujoch-preview): fix error handling for jungfraujoch preview client.
CI for csaxs_bec / test (push) Successful in 1m49s
CI for csaxs_bec / test (pull_request) Successful in 1m39s

This commit is contained in:
2026-05-16 10:09:47 +02:00
parent 86fde7ca17
commit ee0451d80b
@@ -213,7 +213,12 @@ class JungfrauJochPreview:
# pylint: disable=no-member
r = self._socket.recv_multipart(flags=zmq.NOBLOCK)
self._parse_data(r)
except zmq.error.Again:
# No message received, this is expected when the receive queue is empty
pass
except Exception as e:
# Consider moving this to debug level, but it can be useful to see why preview updates are not working
logger.info(f"Error while receiving ZMQ message from JFJ preview at {self.url}: {e}")
finally:
# Unsubscribe from the topic
self._socket.setsockopt(zmq.UNSUBSCRIBE, ZMQ_TOPIC_FILTER)