diff options
author | Garrett D'Amore <garrett@damore.org> | 2016-05-15 16:03:56 -0700 |
---|---|---|
committer | Garrett D'Amore <garrett@damore.org> | 2016-05-15 18:32:00 -0700 |
commit | 45ac5fae6094101c94397e82c2a3fb7f4bffefaf (patch) | |
tree | f4040a5e9f7bd9bcce92c7c7267993c47a52b6e6 /tests | |
parent | bdae89d28d16d29bbeda2abf0152936afa4db03a (diff) | |
download | nanomsg-45ac5fae6094101c94397e82c2a3fb7f4bffefaf.tar.gz |
fixes #699 tcp_shutdown hangs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ipc_shutdown.c | 1 | ||||
-rw-r--r-- | tests/tcp_shutdown.c | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/ipc_shutdown.c b/tests/ipc_shutdown.c index ed3852d..a69bd35 100644 --- a/tests/ipc_shutdown.c +++ b/tests/ipc_shutdown.c @@ -107,6 +107,7 @@ int main () while (active) { (void) nn_send (sb, "hello", 5, NN_DONTWAIT); + nn_sleep (0); } for (i = 0; i != TEST2_THREAD_COUNT; ++i) diff --git a/tests/tcp_shutdown.c b/tests/tcp_shutdown.c index 012c111..2a5765e 100644 --- a/tests/tcp_shutdown.c +++ b/tests/tcp_shutdown.c @@ -63,9 +63,7 @@ static void routine2 (NN_UNUSED void *arg) s = test_socket (AF_SP, NN_PULL); - for (i = 0; i < 10; ++i) { - test_connect (s, socket_address); - } + test_connect (s, socket_address); ms = 2000; test_setsockopt (s, NN_SOL_SOCKET, NN_RCVTIMEO, &ms, sizeof (ms)); @@ -122,6 +120,7 @@ int main (int argc, const char *argv[]) test_setsockopt (sb, NN_SOL_SOCKET, NN_SNDTIMEO, &ms, sizeof (ms)); while (active.n) { (void) nn_send (sb, "hello", 5, NN_DONTWAIT); + nn_sleep(0); } for (i = 0; i != TEST2_THREAD_COUNT; ++i) |