(update_sched): The indefinite sleep when there's no scheduled update

went into a tight loop instead, freezing the server.
This commit is contained in:
Ron Koenderink 2007-09-02 15:04:23 +00:00
parent 808611da87
commit 2ece63c54a

View file

@ -137,7 +137,7 @@ update_sched(void *unused)
} else {
logerror("No update scheduled");
/* want to sleep forever, but empthread doesn't provide that */
while (empth_sleep(60 * 60 * 24) >= 0) ;
while (empth_sleep(time(NULL) + (60 * 60 * 24)) >= 0) ;
}
now = time(NULL);