diff --git a/src/lib/empthread/ntthread.c b/src/lib/empthread/ntthread.c index bc2e9d9c..4f736949 100644 --- a/src/lib/empthread/ntthread.c +++ b/src/lib/empthread/ntthread.c @@ -601,7 +601,7 @@ empth_sleep(time_t until) empth_t *pThread = TlsGetValue(dwTLSIndex); int iReturn = 0; - if ((lSec = until - time(0)) > 0) { + while (!iReturn && ((lSec = until - time(0)) > 0)) { loc_BlockThisThread(); loc_debug("going to sleep %ld sec", lSec);