Commit 4c753060 authored by Pieter Hintjens's avatar Pieter Hintjens

Fixed test_stream case

- was not looping to read all input from peer
- broke on OS/X specifically
parent 9dd324aa
......@@ -98,7 +98,12 @@ test_stream_to_dealer (void)
// Second frame contains the rest of greeting along with
// the Ready command
rc = zmq_recv (stream, buffer, 255, 0);
int bytes_read = 0;
while (bytes_read < 97) {
rc = zmq_recv (stream, buffer + bytes_read, 255 - bytes_read, 0);
assert (rc >= 0);
bytes_read += rc;
}
assert (rc == 97);
// First two bytes are major and minor version numbers.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment