Skip to content

Commit

Permalink
logbroker: properly catch KeyboardInterrupt to avoid a stracktrace wh…
Browse files Browse the repository at this point in the history
…en Ctrl+C
  • Loading branch information
alexAubin committed Nov 6, 2024
1 parent 23b8695 commit c89f59d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions moulinette/utils/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ def server():
frontend = ctx.socket(zmq.XPUB)
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()
backend.close()
ctx.term()
Expand Down

0 comments on commit c89f59d

Please sign in to comment.