mirror of
https://github.com/zeromq/libzmq.git
synced 2024-12-27 15:41:05 +08:00
Fixed wrong assert in zmq_recv
zmq_recv returns bytes count, not error code, so 'assert (rc==0)' behaved completely wrong
This commit is contained in:
parent
5ced51b753
commit
6a627acea7
@ -44,8 +44,8 @@ EXAMPLE
|
||||
zmq_msg_t msg;
|
||||
rc = zmq_msg_init (&msg);
|
||||
assert (rc == 0);
|
||||
rc = zmq_recv (socket, &msg, 0);
|
||||
assert (rc == 0);
|
||||
int nbytes = zmq_recv (socket, &msg, 0);
|
||||
assert (nbytes != -1);
|
||||
----
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user