diff options
author | Martin Sustrik <sustrik@250bpm.com> | 2010-02-17 20:33:00 +0100 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2010-02-17 20:33:00 +0100 |
commit | e385319e5aaff6deafddfb216b24f026b461caa6 (patch) | |
tree | 99eb19ab3f668233d845b96fef2d82092fe4f391 /src | |
parent | f745c96a9bcf930d10fe31de5f7b3e772cccfa83 (diff) |
recv returning -1 while errno=0 fixed
Diffstat (limited to 'src')
-rw-r--r-- | src/socket_base.cpp | 2 |
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; } |