aboutsummaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2010-04-16 22:58:04 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-04-16 22:58:04 +0200
commit520cee3fb7319eb44d226aaaab9688ae91bc3278 (patch)
tree610055e28cbd33909324a4adbafc6eefc937a9e7 /lib/socks.c
parentfa7341143a4bb5c1c1a2d43375bbc9a2157938ec (diff)
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.
Diffstat (limited to 'lib/socks.c')
-rw-r--r--lib/socks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/socks.c b/lib/socks.c
index eb7956798..0b051545c 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -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