test504: fix handling on pending connect
Test expected a connect to a port no one is listening to immediately fail. But Windows has its internal retry logic that may fail this. As fix, multi_perform()/multi_wait() until transfer is done. Closes #15054
This commit is contained in:
parent
17a7e12e1b
commit
cbbf4d8ed2
@ -72,6 +72,21 @@ CURLcode test(char *URL)
|
||||
|
||||
multi_perform(m, &running);
|
||||
|
||||
while(running) {
|
||||
CURLMcode mres;
|
||||
int num;
|
||||
mres = curl_multi_wait(m, NULL, 0, TEST_HANG_TIMEOUT, &num);
|
||||
if(mres != CURLM_OK) {
|
||||
printf("curl_multi_wait() returned %d\n", mres);
|
||||
res = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
||||
abort_on_test_timeout();
|
||||
multi_perform(m, &running);
|
||||
abort_on_test_timeout();
|
||||
}
|
||||
|
||||
abort_on_test_timeout();
|
||||
|
||||
if(!running) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user