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

Matthias Kluwe mkluwe at gmail.com
Thu Jun 5 19:51:55 CEST 2014


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

> 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.


More information about the zeromq-dev mailing list