[zeromq-dev] EAGAIN with zmq_disconnect on inproc socket

Stefan Radomski radomski at tk.informatik.tu-darmstadt.de
Tue Dec 4 03:14:31 CET 2012

Hi again,

attached is a patch for socket_base.cpp and socket_base.hpp to be applied against the current 3.2.2 release (2012/11/23) as well as a test-case. I am pretty new to the zeromq source, so please review extra carefully. I am not sure whether we should remove the pipe from pipes array as well.

The patch solves both LIBZMQ-476 and (by coincidence) LIBZMQ-475 I reported earlier.

Best regards

On Dec 3, 2012, at 9:52 PM, Martin Hurton <hurtonm at gmail.com> wrote:

>> But I cannot figure out, which pipe to terminate as I am having difficulties finding out, which one is connected to the peer endpoint. Also, I am not sure how to terminate a pipe - is it actually sufficient to call terminate on the pipe? If you help me to complete this one, I'll submit it as a patch.
> To terminate a pipe, you can use terminate method. The method takes a
> flag which indicates whether you are to allow the pipe to process
> queued messages. This is used to allow the pipe to process queued
> messages, depending on the linger setting.

This flag is set to true for now, I am not sure about the eventual implications for inproc sockets.

> As for endpoint tracking, I would suggest to keep separate container
> for inproc connections.
> Would be great to have this covered by a test too.
> - Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: socket_base.cpp.diff
Type: application/octet-stream
Size: 1021 bytes
Desc: socket_base.cpp.diff
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121204/a84622ea/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: socket_base.hpp.diff
Type: application/octet-stream
Size: 160 bytes
Desc: socket_base.hpp.diff
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121204/a84622ea/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-zeromq-disconnect.cpp
Type: application/octet-stream
Size: 4274 bytes
Desc: test-zeromq-disconnect.cpp
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121204/a84622ea/attachment-0002.obj>

More information about the zeromq-dev mailing list