]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
socks5: switch state properly when the resolve is done
authorDaniel Stenberg <daniel@haxx.se>
Fri, 6 Mar 2020 21:32:38 +0000 (22:32 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 7 Mar 2020 09:47:44 +0000 (10:47 +0100)
Regression from 4a4b63d (and #4907)
Reported-by: vitaha85 on github
Fixes #5053
Closes #5056

lib/socks.c

index 0fb97e1e5db2327970856657fb73b73507a684e7..754726f6fb8d63e8add9de05173b005a8594cdbb 100644 (file)
@@ -763,8 +763,8 @@ CURLcode Curl_SOCKS5(const char *proxy_user,
 
     if(!dns) {
       result = Curl_resolv_check(data->conn, &dns);
-      /* stay in the state or error out */
-      return result;
+      if(!dns)
+        return result;
     }
     /* FALLTHROUGH */
   CONNECT_RESOLVED: