recv returning -1 while errno=0 fixed

This commit is contained in:
Martin Sustrik
2010-02-17 20:33:00 +01:00
parent f745c96a9b
commit e385319e5a

View File

@@ -331,6 +331,7 @@ int zmq::socket_base_t::recv (::zmq_msg_t *msg_, int flags_)
{ {
// Get the message. // Get the message.
int rc = xrecv (msg_, flags_); int rc = xrecv (msg_, flags_);
int err = errno;
// Once every inbound_poll_rate messages check for signals and process // Once every inbound_poll_rate messages check for signals and process
// incoming commands. This happens only if we are not polling altogether // 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; return rc;
} }