Hi,

I have seen that the function /zmq::fd_t zmq::tcp_connecter_t::connect ()/ is called quite often when some apps are communicating. I am not sure about the reasons, I think the LAN where I've done the tests is not working properly, sometimes (mayby minutes, maybe hours) an error WSAEADDRINUSE happens. In line (253) some values are checked and the error is dicarded if it is a known error but not WSAEADDRINUSE.
    //  Assert if the error was caused by 0MQ bug.
    //  Networking problems are OK. No need to assert.

I d not know why this error happens and I do not know if it is really serious, what I've seen is that adding this error to the discardable ones seems to leave things working well. I am not saying this is the solution because I do not really know potential side damages but now I have the 'if' like this (bold added by me):

#ifdef ZMQ_HAVE_WINDOWS
    zmq_assert (rc == 0);
    if (err != 0) {
        if (err == WSAECONNREFUSED || err == WSAETIMEDOUT ||
              err == WSAECONNABORTED || err == WSAEHOSTUNREACH ||
              err == WSAENETUNREACH || err == WSAENETDOWN
*|| err == WSAEADDRINUSE* // PAUMOD Sometimes this happens but nothing goes terribly wrong
              )
            return retired_fd;
        wsa_assert_no (err);
    }
#else

Does anybody know what is the best attitude in front of this error?

thanks,

Pau Ceano
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to