From 3bbd280336dffc73ef43b2ac93937f320cb32872 Mon Sep 17 00:00:00 2001
From: sapier <Sapier at GMX dot net>
Date: Fri, 10 Jan 2014 19:19:16 +0100
Subject: [PATCH] Fix check for max_fd == -1 should actually be max_fd != -1

---
 src/httpfetch.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp
index 176a3b22a..3d9447358 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,
-- 
GitLab