[zeromq-dev] zmq_proxy_steerable: EAGAIN (errno 11) is returned when sending TERMINATE over control socket
Francesco
francesco.montorsi at gmail.com
Tue Jul 4 15:55:06 CEST 2017
Hi all,
I added a ZMQ proxy thread to my application.
Such proxy has frontend and control socket transport of type 'inproc',
backend socket transport is 'tcp' . The proxy runs in its own thread
and collects messages coming from other threads that have PUB sockets
and 'inproc' transports (connected to the proxy frontend).
For the control socket I do the following: create a SUB socket (with
inproc transport) and provide it to zmq_proxy_steerable(); then I
create a PUB socket (same endpoint).
At the shutdown of my application I send "TERMINATE" over the control
PUB socket:
// ask the proxy to terminate:
int rc = zmq_send (m_control_pub, "TERMINATE", 9, 0);
// IMPORTANT: for some reason with libzmq 4.2.2 I always get errno==11
even if I'm not using ZMQ_DONTWAIT
assert_msg( rc == 0 || errno == 11, "Failed ZMQ API with errno %d",
zmq_errno() );
As comment above says, the zmq_send() always fails with EAGAIN... is that a bug?
Note that apparently the proxy manages to exit correctly so that the
message seems to be received correctly...
Thanks,
Francesco
More information about the zeromq-dev
mailing list