summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sustrik <sustrik@250bpm.com>2010-02-17 20:33:00 +0100
committerMartin Sustrik <sustrik@250bpm.com>2010-02-17 20:33:00 +0100
commite385319e5aaff6deafddfb216b24f026b461caa6 (patch)
tree99eb19ab3f668233d845b96fef2d82092fe4f391
parentf745c96a9bcf930d10fe31de5f7b3e772cccfa83 (diff)
recv returning -1 while errno=0 fixed
-rw-r--r--src/socket_base.cpp2
1 files changed, 2 insertions, 0 deletions
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;
}