Fix check for max_fd == -1 should actually be max_fd != -1
authorsapier <Sapier at GMX dot net>
Fri, 10 Jan 2014 18:19:16 +0000 (19:19 +0100)
committersapier <Sapier at GMX dot net>
Fri, 10 Jan 2014 18:19:16 +0000 (19:19 +0100)
src/httpfetch.cpp

index 176a3b22a057792d335da6e374f4d0ee0f201926..3d944735876234645d046de772f2881027fdc215 100644 (file)
@@ -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,