This makes the code flow more obvious and reacts on the return
code properly, even if the code acted the same way before.
if(rc == CURLRESOLV_ERROR)
return CURLE_COULDNT_RESOLVE_HOST;
- if(rc == CURLRESOLV_PENDING)
+ if(rc == CURLRESOLV_PENDING) {
/* this requires that we're in "wait for resolve" state */
rc = Curl_wait_for_resolv(conn, &dns);
+ if(rc)
+ return rc;
+ }
/*
* We cannot use 'hostent' as a struct that Curl_resolv() returns. It