From e385319e5aaff6deafddfb216b24f026b461caa6 Mon Sep 17 00:00:00 2001 From: Martin Sustrik Date: Wed, 17 Feb 2010 20:33:00 +0100 Subject: recv returning -1 while errno=0 fixed --- src/socket_base.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/socket_base.cpp b/src/socket_base.cpp index 720e8cd..6f1e5a3 100644 --- a/src/socket_base.cpp +++ b/src/socket_base.cpp @@ -331,6 +331,7 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_) { // Get the message. int rc = xrecv (msg_, flags_); + int err = errno; // Once every inbound_poll_rate messages check for signals and process // incoming commands. This happens only if we are not polling altogether @@ -371,6 +372,7 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_) } } + errno = err; return rc; } -- cgit v1.2.3