ZMQ publisher might hang if it sends a message during ctrl + c
authorimarom <[email protected]>
Mon, 27 Feb 2017 12:46:46 +0000 (14:46 +0200)
committerimarom <[email protected]>
Mon, 27 Feb 2017 12:49:49 +0000 (14:49 +0200)
commitfd87764ebc8733b44bc4a43a180b635ce190a123
tree85214d10351544328eb2f0b38effdd55bd67507b
parent768b4f27f89fc4ed40c8588db3b3a751abf41d5e
ZMQ publisher might hang if it sends a message during ctrl + c
the reason is that when calling zmq_close and zmq_term from the same
thread, zmq_close will wait for the message to be sent (but will return
the control to the calling thread)

and then zmq_ctx_destroy will hang forever

see:
https://lists.zeromq.org/pipermail/zeromq-dev/2013-September/022469.html

Signed-off-by: imarom <[email protected]>
src/publisher/trex_publisher.cpp