diff options
author | Björn Stenberg <bjst@bjorn> | 2013-11-11 23:43:48 +0100 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2013-11-11 23:41:44 +0000 |
commit | fa1253aee1847bd24cbc1d23e5579d823fc16d2a (patch) | |
tree | 9587dd8319d69b352b88c0fc0d07a10e1bf73f55 | |
parent | f833f54979e5425b932a5f3a5009ce21f28f3a5a (diff) |
multi: Set read socket when returning READSOCK(0)
This patch fixes and issue introduced in commit 7d7df831981fee, 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.
-rw-r--r-- | lib/multi.c | 4 |
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; } |