1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-15 05:55:04 -05:00

multi: Set read socket when returning READSOCK(0)

This patch fixes and issue introduced in commit 7d7df83198, if the
tunnel state was TUNNEL_CONNECT, waitconnect_getsock() would return a
bitmask indicating a readable socket but never stored the socket in the
return array.
This commit is contained in:
Björn Stenberg 2013-11-11 23:43:48 +01:00 committed by Steve Holme
parent f833f54979
commit fa1253aee1

View File

@ -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;
}