[zeromq-dev] zmq_proxy_steerable: EAGAIN (errno 11) is returned when sending TERMINATE over control socket

Luca Boccassi luca.boccassi at gmail.com
Thu Jul 6 00:30:12 CEST 2017

On Tue, 2017-07-04 at 09:55 -0400, Francesco wrote:
> 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


Do you have a minimal, self-contained example to reproduce the problem?

Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20170705/528ae031/attachment.sig>

More information about the zeromq-dev mailing list