From ff8576b944fb68511c86491668eff76b10f6a7c5 Mon Sep 17 00:00:00 2001 From: Christian Wieninger Date: Wed, 28 Nov 2007 19:37:46 +0100 Subject: - faster exit when thread is canceled --- searchtimer_thread.c | 2 +- switchtimer_thread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/searchtimer_thread.c b/searchtimer_thread.c index f4e3070..ae832c0 100644 --- a/searchtimer_thread.c +++ b/searchtimer_thread.c @@ -221,7 +221,7 @@ void cSearchTimerThread::Action(void) cSearchExt *searchExt = localSearchExts->First(); // reset announcelist announceList.Clear(); - while (searchExt) + while (searchExt && m_Active) { if (!searchExt->IsActiveAt(now)) { diff --git a/switchtimer_thread.c b/switchtimer_thread.c index 179af83..f8e10d8 100644 --- a/switchtimer_thread.c +++ b/switchtimer_thread.c @@ -81,7 +81,7 @@ void cSwitchTimerThread::Action(void) cMutexLock SwitchTimersLock(&SwitchTimers); LogFile.Log(3,"switch timer check started"); cSwitchTimer* switchTimer = SwitchTimers.First(); - while (switchTimer) + while (switchTimer && m_Active) { const cEvent* event = switchTimer->event; if (event && event->StartTime() - now < switchTimer->switchMinsBefore*60 + MSG_DELAY + 1) -- cgit v1.2.3