From e2a5bbe4e59bba56cbe1138c9ae76c1e9af9ba66 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 11 Aug 2017 16:14:08 -0700 Subject: Fail to another stream on default (no pipe requested). --- tests/pair1.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tests') 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); }); -- cgit v1.2.3-70-g09d2