aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/multi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 722cd8625..2cb46ceec 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -637,8 +637,10 @@ static int waitconnect_getsock(struct connectdata *conn,
/* when we've sent a CONNECT to a proxy, we should rather wait for the
socket to become readable to be able to get the response headers */
- if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT)
+ if(conn->tunnel_state[FIRSTSOCKET] == TUNNEL_CONNECT) {
+ sock[0] = conn->sock[FIRSTSOCKET];
return GETSOCK_READSOCK(0);
+ }
return rc;
}