src/corelib/kernel/qcore_unix.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
--- a/src/corelib/kernel/qcore_unix.cpp	Tue Jan 26 12:42:25 2010 +0200
+++ b/src/corelib/kernel/qcore_unix.cpp	Tue Feb 02 00:43:10 2010 +0200
@@ -129,7 +129,7 @@
     // clock source is monotonic, so we can recalculate how much timeout is left
     struct timeval now = qt_gettime();
     *tv = timeout + start - now;
-    return true;
+    return tv->tv_sec >= 0;
 }
 
 int qt_safe_select(int nfds, fd_set *fdread, fd_set *fdwrite, fd_set *fdexcept,
@@ -154,7 +154,8 @@
 
         // recalculate the timeout
         if (!time_update(&timeout, start, *orig_timeout)) {
-            // clock reset, fake timeout error
+            // timeout during update
+            // or clock reset, fake timeout error
             return 0;
         }
     }