logbroker: properly catch KeyboardInterrupt to avoid a stracktrace when Ctrl+C

This commit is contained in:
Alexandre Aubin 2023-05-19 20:12:43 +02:00
parent 2ac17c2f46
commit ad345ee1bf

View file

@ -222,9 +222,11 @@ def start_log_broker():
frontend = ctx.socket(zmq.XPUB) frontend = ctx.socket(zmq.XPUB)
frontend.bind(LOG_BROKER_FRONTEND_ENDPOINT) frontend.bind(LOG_BROKER_FRONTEND_ENDPOINT)
zmq.proxy(frontend, backend) try:
zmq.proxy(frontend, backend)
except KeyboardInterrupt:
pass
# Example says "we never get here"?
frontend.close() frontend.close()
backend.close() backend.close()
ctx.term() ctx.term()