lib530: make it less timing sensible

... by making sure the first request is completed before doing the
remainder.
This commit is contained in:
Daniel Stenberg 2015-02-24 00:06:36 +01:00
parent e08a12dab1
commit da39f380a4
1 changed files with 9 additions and 7 deletions

View File

@ -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 * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -83,13 +83,15 @@ int test(char *URL)
abort_on_test_timeout(); abort_on_test_timeout();
if(!running && handles_added >= NUM_HANDLES) if(!running) {
break; /* done */ if(handles_added >= NUM_HANDLES)
break; /* done */
/* Add the rest of the handles now that the first handle has sent the /* Add the rest of the handles now that the first handle has completed
request. */ its request. */
while(handles_added < NUM_HANDLES) while(handles_added < NUM_HANDLES)
multi_add_handle(m, curl[handles_added++]); multi_add_handle(m, curl[handles_added++]);
}
FD_ZERO(&rd); FD_ZERO(&rd);
FD_ZERO(&wr); FD_ZERO(&wr);