Skip to content
Snippets Groups Projects
Commit a05ea124 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

oops, serious breakage in the fdset() function

parent 6a03ab3a
No related branches found
No related tags found
No related merge requests found
......@@ -1570,11 +1570,12 @@ int Curl_single_getsock(struct connectdata *conn,
}
if(conn->keep.keepon & KEEP_WRITE) {
if((conn->sockfd != conn->writesockfd) &&
(conn->keep.keepon & KEEP_READ)) {
/* only if they are not the same socket and we had a readable one,
we increase index */
index++;
if((conn->sockfd != conn->writesockfd) ||
!(conn->keep.keepon & KEEP_READ)) {
/* only if they are not the same socket or we didn't have a readable
one, we increase index */
if(conn->keep.keepon & KEEP_READ)
index++; /* increase index if we need two entries */
sock[index] = conn->writesockfd;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment