[zeromq-dev] Assertion failed: Address already in use

Pieter Hintjens ph at imatix.com
Thu Jun 5 23:22:37 CEST 2014

Thanks! I merged the PR.

On Thu, Jun 5, 2014 at 7:51 PM, Matthias Kluwe <mkluwe at gmail.com> wrote:
> Hi!
> Am 05.06.2014 11:01, schrieb Pieter Hintjens:
>> Right, I appreciate that the point of the test was to break things.
>> Doing a little research, I see that Windows will sometimes return
>> WSAEADDRINUSE when reconnecting to a port. It's not what you'd expect,
>> and the code does not handle it, and so asserts. See
>> http://dev.mainsoft.com/Default.aspx?tabid=107.
>> Would you add a test for err = WSAEADDRINUSE to that code and rerun
>> the test case. I'd expect that the error will provoke a reconnect, if
>> the thread gives the socket time for that, and nothing if the socket
>> is closed too rapidly.
> Works as expected. With unchanged test code, I get the "Address in use"
> error from ZeroMQ now (after a few thousand calls, usually). No
> assertion any more :-)
> When given a few milliseconds time in the loop, it seems to run
> indefinitely.
>> If it works, we can make a pull request. Thanks for working through
>> this. ZeroMQ should assert only when it's gotten into an inconsistent
>> state.
> I created the pull request. Thank you for your time.
> Regards,
> Matthias
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list