On Sun, Apr 11, 2010 at 3:42 PM, Martin Sustrik <[email protected]> wrote: > The patch currently committed to the trunk solves the problem in the > following way: > > When context is closed (zmq_term), all threads that are currently > blocked in blocking calls - such as zmq_recv - will exit immediately > with ETERM error. > > Any subsequent attempts to use sockets will produce ETERM error.
Hello, would it be possible to add something like 'zmq_ping' to check if the socket is still usable? I would imagine currently seeing whether socket is still usable is to send/recv. For example in PHP bindings the context and the socket are persisted between multiple requests so 'zmq_ping' would allow checking the liveness of the socket when it's being retrieved. In theory the context should never be freed before the socket but there should be no harm in additional checks. I think 'zmq_ping' could also check the liveness of the actual connections and possibly reconnect if needed. -- Mikko Koppanen _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
