Created
August 20, 2021 12:10
-
-
Save bagder/62208085f8229035924aa90f873d4c50 to your computer and use it in GitHub Desktop.
select.c fix for clearing revents
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/select.c b/lib/select.c | |
index 52dca5a2c..3be32ceb5 100644 | |
--- a/lib/select.c | |
+++ b/lib/select.c | |
@@ -344,10 +344,11 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms) | |
for(i = 0; i < nfds; i++) { | |
if(ufds[i].fd != CURL_SOCKET_BAD) { | |
fds_none = FALSE; | |
break; | |
} | |
+ ufds[i].revents = 0; | |
} | |
} | |
if(fds_none) { | |
/* no sockets, just wait */ | |
return Curl_wait_ms(timeout_ms); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment