mirror of
https://github.com/curl/curl.git
synced 2026-05-17 12:56:21 +03:00
SOCKS5: when name resolves fail return immediately
This makes the code flow more obvious and reacts on the return code properly, even if the code acted the same way before.
This commit is contained in:
parent
fa7341143a
commit
520cee3fb7
1 changed files with 4 additions and 1 deletions
|
|
@ -597,9 +597,12 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
|
|||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue