mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
logbroker: properly catch KeyboardInterrupt to avoid a stracktrace when Ctrl+C
This commit is contained in:
parent
2ac17c2f46
commit
ad345ee1bf
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||||
|
|
||||||
|
try:
|
||||||
zmq.proxy(frontend, backend)
|
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()
|
||||||
|
|
Loading…
Add table
Reference in a new issue