diff options
Diffstat (limited to 'tests/libtest/lib1900.c')
-rw-r--r-- | tests/libtest/lib1900.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/libtest/lib1900.c b/tests/libtest/lib1900.c index b55f3b7d8..cac1dd1d9 100644 --- a/tests/libtest/lib1900.c +++ b/tests/libtest/lib1900.c @@ -189,8 +189,9 @@ int test(char *URL) abort_on_test_timeout(); /* See how the transfers went */ - while((msg = curl_multi_info_read(m, &msgs_left))) { - if(msg->msg == CURLMSG_DONE) { + do { + msg = curl_multi_info_read(m, &msgs_left); + if(msg && msg->msg == CURLMSG_DONE) { int i, found = 0; /* Find out which handle this message is about */ @@ -203,7 +204,7 @@ int test(char *URL) printf("Handle %d Completed with status %d\n", i, msg->data.result); curl_multi_remove_handle(m, handles[i]); } - } + } while(msg); if(handlenum == num_handles && !running) { break; /* done */ |