summaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-02-14 16:16:54 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-02-14 16:17:05 +0100
commit692cb461056f012162470d183b3529429777c8bc (patch)
treefa035083bb751b08afb0eb07b8ec14732c1c013d /lib/multi.c
parentaf9afd8b17dc6acecf76d6a95e8971b7788f7bba (diff)
downloadcurl-bagder/socks-nonblocking.tar.gz
socks: make the connect phase non-blockingbagder/socks-nonblocking
Removes two entries from KNOWN_BUGS. Closes #4907
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 37a37a4f0..9e7278569 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -47,6 +47,7 @@
#include "http_proxy.h"
#include "http2.h"
#include "socketpair.h"
+#include "socks.h"
/* The last 3 #include files should be in this order */
#include "curl_printf.h"
#include "curl_memory.h"
@@ -856,6 +857,9 @@ static int waitconnect_getsock(struct connectdata *conn,
return Curl_ssl_getsock(conn, sock);
#endif
+ if(SOCKS_STATE(conn->cnnct.state))
+ return Curl_SOCKS_getsock(conn, sock, FIRSTSOCKET);
+
for(i = 0; i<2; i++) {
if(conn->tempsock[i] != CURL_SOCKET_BAD) {
sock[s] = conn->tempsock[i];