[zeromq-dev] [BUG?] Strange freeze in zmq_send call when use ZMQ_PUSH socket

Pieter Hintjens ph at imatix.com
Wed Nov 3 13:55:00 CET 2010


Hi Олег,

I can confirm this happens in 2.1.0 (git master) and 2.0.10 (stable),
in C.  If you connect a PULL socket to the endpoint, the zmq_send()
call returns.

So this looks like normal behavior though it's kind of surprising.

-Pieter

On Wed, Nov 3, 2010 at 1:44 PM, Олег Севостьянов <oleg.sev at gmail.com> wrote:
>  I got freeze when call zmq_send() with a socket ZMP_PUSH witch binded
> on "tcp://*:18001". Zmq_send() called with flag set to zero and no
> connected clients.
>
> test case: http://pastebin.com/ksp0cJnr
>
> I test on Windows, MSVC2005 build
>
> P.S. It's freeze in:
>
> int zmq::signaler_t::recv (command_t *cmd_, bool block_)
> {
>    if (block_) {
>
>        //  Switch to blocking mode.
>        unsigned long argp = 0;
>        int rc = ioctlsocket (r, FIONBIO, &argp);
>        wsa_assert (rc != SOCKET_ERROR);
>    }
>
>    int err;
>    int result;
>>>>> here >>>    int nbytes = ::recv (r, (char*) cmd_, sizeof (command_t), 0);
>    if (nbytes == -1 && WSAGetLastError () == WSAEWOULDBLOCK) {
>        err = EAGAIN;
>        result = -1;
>    }
>
> --
> С уважением,
>   Олег Севостьянов
>
> JabberID: boojab at jabber.ru
> _______________________________________________
> 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