From 3bbd280336dffc73ef43b2ac93937f320cb32872 Mon Sep 17 00:00:00 2001 From: sapier 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 176a3b22..3d944735 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -548,7 +548,7 @@ protected: 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, -- 2.30.2