mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
oops, serious breakage in the fdset() function
This commit is contained in:
parent
6a03ab3ad4
commit
a05ea124b9
@ -1570,11 +1570,12 @@ int Curl_single_getsock(struct connectdata *conn,
|
|||||||
}
|
}
|
||||||
if(conn->keep.keepon & KEEP_WRITE) {
|
if(conn->keep.keepon & KEEP_WRITE) {
|
||||||
|
|
||||||
if((conn->sockfd != conn->writesockfd) &&
|
if((conn->sockfd != conn->writesockfd) ||
|
||||||
(conn->keep.keepon & KEEP_READ)) {
|
!(conn->keep.keepon & KEEP_READ)) {
|
||||||
/* only if they are not the same socket and we had a readable one,
|
/* only if they are not the same socket or we didn't have a readable
|
||||||
we increase index */
|
one, we increase index */
|
||||||
index++;
|
if(conn->keep.keepon & KEEP_READ)
|
||||||
|
index++; /* increase index if we need two entries */
|
||||||
sock[index] = conn->writesockfd;
|
sock[index] = conn->writesockfd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user