aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib530.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2015-02-24 00:06:36 +0100
committerDaniel Stenberg <daniel@haxx.se>2015-02-24 11:50:19 +0100
commitda39f380a4725189036ad73cb8dff288497d80e9 (patch)
tree9d82220bbceb97504b1d04c0589a80432d42cfb3 /tests/libtest/lib530.c
parente08a12dab1a410c94bf75aef04251bf64c127eb6 (diff)
lib530: make it less timing sensible
... by making sure the first request is completed before doing the remainder.
Diffstat (limited to 'tests/libtest/lib530.c')
-rw-r--r--tests/libtest/lib530.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/libtest/lib530.c b/tests/libtest/lib530.c
index 06a846439..e60d11729 100644
--- a/tests/libtest/lib530.c
+++ b/tests/libtest/lib530.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -83,13 +83,15 @@ int test(char *URL)
abort_on_test_timeout();
- if(!running && handles_added >= NUM_HANDLES)
- break; /* done */
+ if(!running) {
+ if(handles_added >= NUM_HANDLES)
+ break; /* done */
- /* Add the rest of the handles now that the first handle has sent the
- request. */
- while(handles_added < NUM_HANDLES)
- multi_add_handle(m, curl[handles_added++]);
+ /* Add the rest of the handles now that the first handle has completed
+ its request. */
+ while(handles_added < NUM_HANDLES)
+ multi_add_handle(m, curl[handles_added++]);
+ }
FD_ZERO(&rd);
FD_ZERO(&wr);