Commit dc105ffc authored by Richard Newton's avatar Richard Newton

Fix xpub test to set hwm before bind.

parent d4b11b0d
...@@ -38,7 +38,12 @@ int main (void) ...@@ -38,7 +38,12 @@ int main (void)
// Create a publisher // Create a publisher
void *pub = zmq_socket (ctx, ZMQ_PUB); void *pub = zmq_socket (ctx, ZMQ_PUB);
assert (pub); assert (pub);
int rc = zmq_bind (pub, "inproc://soname");
int hwm = 2000;
int rc = zmq_setsockopt(pub, ZMQ_SNDHWM, &hwm, 4);
assert(rc == 0);
rc = zmq_bind (pub, "inproc://soname");
assert (rc == 0); assert (rc == 0);
// set pub socket options // set pub socket options
...@@ -46,9 +51,6 @@ int main (void) ...@@ -46,9 +51,6 @@ int main (void)
rc = zmq_setsockopt (pub, ZMQ_XPUB_NODROP, &wait, 4); rc = zmq_setsockopt (pub, ZMQ_XPUB_NODROP, &wait, 4);
assert (rc == 0); assert (rc == 0);
int hwm = 2000;
rc = zmq_setsockopt (pub, ZMQ_SNDHWM, &hwm, 4);
assert (rc == 0);
// Create a subscriber // Create a subscriber
void *sub = zmq_socket (ctx, ZMQ_SUB); void *sub = zmq_socket (ctx, ZMQ_SUB);
......
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