diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-11 16:14:08 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-11 16:14:08 -0700 |
| commit | e2a5bbe4e59bba56cbe1138c9ae76c1e9af9ba66 (patch) | |
| tree | bfc850d4282d0c8c356698aca74ed158db317e4f /tests/pair1.c | |
| parent | 03f5d12c3b7f5b385d3dbe012b3465e54518b762 (diff) | |
| download | nng-e2a5bbe4e59bba56cbe1138c9ae76c1e9af9ba66.tar.gz nng-e2a5bbe4e59bba56cbe1138c9ae76c1e9af9ba66.tar.bz2 nng-e2a5bbe4e59bba56cbe1138c9ae76c1e9af9ba66.zip | |
Fail to another stream on default (no pipe requested).
Diffstat (limited to 'tests/pair1.c')
| -rw-r--r-- | tests/pair1.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/pair1.c b/tests/pair1.c index d81309ef..62f7b1d6 100644 --- a/tests/pair1.c +++ b/tests/pair1.c @@ -357,14 +357,24 @@ TestMain("PAIRv1 protocol", { So(nng_listen(s1, addr, NULL, NNG_FLAG_SYNCH) == 0); So(nng_dial(c1, addr, NULL, NNG_FLAG_SYNCH) == 0); + nng_usleep(100000); + So(nng_dial(c2, addr, NULL, NNG_FLAG_SYNCH) == 0); So(nng_msg_alloc(&msg, 0) == 0); APPENDSTR(msg, "YES"); So(nng_sendmsg(s1, msg, 0) == 0); So(nng_recvmsg(c1, &msg, 0) == 0); CHECKSTR(msg, "YES"); - p1 = nng_msg_get_pipe(msg); - So(p1 != 0); + nng_msg_free(msg); + + nng_close(c1); + nng_usleep(10000); + + So(nng_msg_alloc(&msg, 0) == 0); + APPENDSTR(msg, "AGAIN"); + So(nng_sendmsg(s1, msg, 0) == 0); + So(nng_recvmsg(c2, &msg, 0) == 0); + CHECKSTR(msg, "AGAIN"); nng_msg_free(msg); }); |
