zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.45k stars 2.34k forks source link

Will there always be a ZMQ_EVENT_CLOSED? #4068

Open blackliner opened 3 years ago

blackliner commented 3 years ago

This is a request for help:

Is there a guaranty that a ZMQ_EVENT_CLOSED will always be received if a socket is closed after a monitor is started on said socket? I want to achieve a blocking close, especially for unit testing, so no socket addresses are rebound when they are in fact still in use.

I know its C++, but as its just a wrapper, the guys from cppzmq sent me over here:

zmq::monitor_t mon;
mon.init( socket, "inproc://monitor", ZMQ_EVENT_CLOSED );
socket.close();
mon.check_event( CLOSING_TIMEOUT_MS );

I come from here: https://github.com/zeromq/cppzmq/issues/454

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had activity for 365 days. It will be closed if no further activity occurs within 56 days. Thank you for your contributions.