Skip to content

Commit

Permalink
Problem: XPUB_MANUAL takes effect for the next bind
Browse files Browse the repository at this point in the history
Solution: fix unit test to bind after setting the option.
  • Loading branch information
bluca committed Jun 21, 2017
1 parent 2d83acc commit 8e20279
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/test_xpub_manual.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ int test_basic()
// Create a publisher
void *pub = zmq_socket (ctx, ZMQ_XPUB);
assert (pub);
int rc = zmq_bind (pub, "inproc://soname");
assert (rc == 0);

// set pub socket options
int manual = 1;
rc = zmq_setsockopt(pub, ZMQ_XPUB_MANUAL, &manual, 4);
int rc = zmq_setsockopt(pub, ZMQ_XPUB_MANUAL, &manual, 4);
assert (rc == 0);
rc = zmq_bind (pub, "inproc://soname");
assert (rc == 0);

// Create a subscriber
Expand Down

0 comments on commit 8e20279

Please sign in to comment.