mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
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.
This commit is contained in:
parent
5565d0ab07
commit
15c4d51d39
@ -1214,10 +1214,10 @@ int Curl_single_getsock(const struct connectdata *conn,
|
|||||||
if((data->req.keepon & KEEP_SENDBITS) == KEEP_SEND) {
|
if((data->req.keepon & KEEP_SENDBITS) == KEEP_SEND) {
|
||||||
|
|
||||||
if((conn->sockfd != conn->writesockfd) ||
|
if((conn->sockfd != conn->writesockfd) ||
|
||||||
!(data->req.keepon & KEEP_RECV)) {
|
bitmap == GETSOCK_BLANK) {
|
||||||
/* only if they are not the same socket or we didn't have a readable
|
/* only if they are not the same socket and we have a readable
|
||||||
one, we increase index */
|
one, we increase index */
|
||||||
if(data->req.keepon & KEEP_RECV)
|
if(bitmap != GETSOCK_BLANK)
|
||||||
sockindex++; /* increase index if we need two entries */
|
sockindex++; /* increase index if we need two entries */
|
||||||
|
|
||||||
DEBUGASSERT(conn->writesockfd != CURL_SOCKET_BAD);
|
DEBUGASSERT(conn->writesockfd != CURL_SOCKET_BAD);
|
||||||
|
Loading…
Reference in New Issue
Block a user