[zeromq-dev] Fixing Socket Problem on ZMQ Version 2.2

Wen Qi Chin wchin09 at gmail.com
Fri Jun 8 22:14:07 CEST 2012

Hello Pieter,

Thank you for your reply. I found your commit changes related to this bug
fix (

and I can try to pull this change into the 2.2 branch.

Looking at the 2.2 vs. 3.2 version, I believe your change would have been
done in the xrep.cpp xrep_t::xrecv function in 2.2. There are some major
differences that would make backporting the change a little tricky. For
example, in 2.2, the zmq_msg_t looks like it's a just a plain C struct, but
in 3.2, it looks like it has some methods defined on it (e.g: msg_->size()
call). Do you have any tips/advice on being able to properly backport the

Thank you,

Wen Qi

Date: Thu, 7 Jun 2012 18:00:56 -0700
From: Pieter Hintjens <ph at imatix.com>
Subject: Re: [zeromq-dev] Fixing Socket Problem on ZMQ Version 2.2
To: ZeroMQ development list <zeromq-dev at lists.zeromq.org>
Content-Type: text/plain; charset=ISO-8859-1

Do you want to try backporting the fix to 2.2? It was not very
complex, as far as I remember. I fixed the code to simply reject the
duplicate identity and generate a random one for the second socket.
If you feel like making this change to 2.2, we need a test case and a
pull request.
On Thu, Jun 7, 2012 at 2:22 PM, Wen Qi Chin <wchin09 at gmail.com> wrote:
> Hello,
> I am currently using zmq version 2.2, and would like to fix a problem
> causes crashes when two sockets connect with the same identity (see
> https://zeromq.jira.com/browse/LIBZMQ-325?for details). This issue seems
> have been resolved in version 3.2, but because there are many significant
> API changes between 2.2 and 3.2, I will not be able to easily upgrade my
> version to pick up the fix. Does anyone know of an easy way to fix this
> problem?on 2.2 instead?
> Thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120608/415cf1ba/attachment.htm>

More information about the zeromq-dev mailing list