diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-01-07 00:59:53 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-01-07 00:59:53 -0800 |
| commit | ffdceebc19214f384f1b1b6b358f1b2301384135 (patch) | |
| tree | 1ea1c79bb73bbbd8db0c910412ba8f569c0b0582 /tests | |
| parent | b21a0bf8eb88ae47e1b8e85731ae9afb37988d61 (diff) | |
| download | nng-ffdceebc19214f384f1b1b6b358f1b2301384135.tar.gz nng-ffdceebc19214f384f1b1b6b358f1b2301384135.tar.bz2 nng-ffdceebc19214f384f1b1b6b358f1b2301384135.zip | |
Add another dial to ensure that accept loop has made progress.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pipeline.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/pipeline.c b/tests/pipeline.c index c2c774c4..14122630 100644 --- a/tests/pipeline.c +++ b/tests/pipeline.c @@ -67,13 +67,16 @@ Main({ Convey("We can create a linked PUSH/PULL pair", { nng_socket *push; nng_socket *pull; + nng_socket *what; So(nng_open(&push, NNG_PROTO_PUSH) == 0); So(nng_open(&pull, NNG_PROTO_PULL) == 0); + So(nng_open(&what, NNG_PROTO_PUSH) == 0); Reset({ nng_close(push); nng_close(pull); + nng_close(what); }) // Its important to avoid a startup race that the @@ -81,6 +84,8 @@ Main({ // since the server accept is really asynchronous. So(nng_listen(pull, addr, NULL, NNG_FLAG_SYNCH) == 0); So(nng_dial(push, addr, NULL, NNG_FLAG_SYNCH) == 0); + So(nng_dial(what, addr, NULL, NNG_FLAG_SYNCH) == 0); + So(nng_shutdown(what) == 0); Convey("Push can send messages, and pull can recv", { nng_msg *msg; |
