summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpixel <pixel>2008-07-22 14:34:59 +0000
committerpixel <pixel>2008-07-22 14:34:59 +0000
commiteb511324fcb7cc1b96375f2047d98c2395ee949b (patch)
tree1e48e6cfcbb630cdefdbe8214ff100c95f37fbef
parente6b0c4399579d66d2cd6205d61681500b2787609 (diff)
Fixing the timeout condition that could sometime fail for non-watchable handles.
-rw-r--r--lib/TaskMan.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/TaskMan.cc b/lib/TaskMan.cc
index f42e8bd..b147a36 100644
--- a/lib/TaskMan.cc
+++ b/lib/TaskMan.cc
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: TaskMan.cc,v 1.57 2008-07-02 16:35:51 pixel Exp $ */
+/* $Id: TaskMan.cc,v 1.58 2008-07-22 14:34:59 pixel Exp $ */
#ifndef _WIN32
#include <signal.h>
@@ -689,7 +689,7 @@ void TaskMan::MainLoop() throw (GeneralException) {
r = poll(ufsd, nfds, timeout_condition ? timeout : 0);
#else
struct timespec ttimeout = { 0, 0 };
- if (timeout != -1) {
+ if ((timeout != -1) && timeout_condition) {
ttimeout.tv_sec = timeout / 1000;
ttimeout.tv_nsec = (timeout - (ttimeout.tv_sec * 1000)) * 1000000;
}