From f31d818c02c95484b7a9c5f8667559bd2524b071 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 14 Apr 2017 14:29:57 -0700 Subject: Pipe ID race on close (pipe IDs are zero at close). This should address some of the errors we've seen. Additionally, the scalability test was a bit brittle due to too-short timeouts. --- tests/scalability.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'tests') diff --git a/tests/scalability.c b/tests/scalability.c index 16f4ba8c..1d8aeda3 100644 --- a/tests/scalability.c +++ b/tests/scalability.c @@ -39,7 +39,7 @@ client(void *arg) return; } - timeo = 40000; // 4 seconds + timeo = 4000000; // 4 seconds if (((rv = nng_setopt(s, NNG_OPT_RCVTIMEO, &timeo, sizeof (timeo))) != 0) || ((rv = nng_setopt(s, NNG_OPT_SNDTIMEO, &timeo, sizeof (timeo))) != 0)) { *result = rv; @@ -49,18 +49,7 @@ client(void *arg) // Sleep for up to a second before issuing requests to avoid saturating // the CPU with bazillions of requests at the same time. - - if ((rv = nng_msg_alloc(&msg, 0)) != 0) { - *result = rv; - nng_close(s); - return; - } - if ((rv = nng_msg_append(msg, "abc", strlen("abc"))) != 0) { - *result = rv; - nng_msg_free(msg); - nng_close(s); - return; - } + nng_usleep(1000000); for (i = 0; i < count; i++) { // Sleep for up to a 1ms before issuing requests to -- cgit v1.2.3-70-g09d2