Skip to content

Instantly share code, notes, and snippets.

@sapier
Created January 10, 2014 16:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sapier/8357314 to your computer and use it in GitHub Desktop.
Save sapier/8357314 to your computer and use it in GitHub Desktop.
diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index 176a3b2..3d94473 100644
--- a/src/httpfetch.cpp
+++ b/src/httpfetch.cpp
@@ -548,7 +548,7 @@ class CurlFetchThread : public JThread
if (select_timeout > 0) {
// in Winsock it is forbidden to pass three empty
// fd_sets to select(), so in that case use sleep_ms
- if (max_fd == -1) {
+ if (max_fd != -1) {
select_tv.tv_sec = select_timeout / 1000;
select_tv.tv_usec = (select_timeout % 1000) * 1000;
int retval = select(max_fd + 1, &read_fd_set,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment