fix task delete issue in scheduled task in sep threads

This commit is contained in:
Anthony Minessale 2013-01-08 14:22:32 -06:00
parent 17b9f68f80
commit 11a7f42459
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ static int task_thread_loop(int done)
for (tp = globals.task_list; tp; tp = tp->next) {
if (done) {
tp->destroyed = 1;
} else {
} else if (!tp->destroyed) {
int64_t now = switch_epoch_time_now(NULL);
if (now >= tp->task.runtime && !tp->in_thread) {
int32_t diff = (int32_t) (now - tp->task.runtime);