diff options
author | Carlo Wood <carlo@alinoe.com> | 2014-11-02 14:09:00 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-11-03 09:40:13 +0100 |
commit | 15c4d51d39ef8be29005fef58a0bb4d5c84796d5 (patch) | |
tree | 02c326c12c7d9c8f4ba5487dca29bfa656172e66 /lib | |
parent | 5565d0ab079b274f4e12d528400308d54df1ffa6 (diff) |
Curl_single_getsock: fix hold/pause sock handling
The previous condition that checked if the socket was marked as readable
when also adding a writable one, was incorrect and didn't take the pause
bits properly into account.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/transfer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 6d4ad43fa..b48dfce84 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -1214,10 +1214,10 @@ int Curl_single_getsock(const struct connectdata *conn, if((data->req.keepon & KEEP_SENDBITS) == KEEP_SEND) { if((conn->sockfd != conn->writesockfd) || - !(data->req.keepon & KEEP_RECV)) { - /* only if they are not the same socket or we didn't have a readable + bitmap == GETSOCK_BLANK) { + /* only if they are not the same socket and we have a readable one, we increase index */ - if(data->req.keepon & KEEP_RECV) + if(bitmap != GETSOCK_BLANK) sockindex++; /* increase index if we need two entries */ DEBUGASSERT(conn->writesockfd != CURL_SOCKET_BAD); |