From e5c747982adfae06c51b60819ec6a4ef5a34ffe2 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 9 Oct 2008 19:17:38 +0200 Subject: update: check progress!=IDLE in reap_update_task() When the update task is idle, there is no need to check for deleted songs. Return early from reap_update_task(). --- src/update.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/update.c b/src/update.c index 34ec1ba77..f5619a1d4 100644 --- a/src/update.c +++ b/src/update.c @@ -438,6 +438,9 @@ void reap_update_task(void) assert(pthread_equal(pthread_self(), main_task)); + if (progress == UPDATE_PROGRESS_IDLE) + return; + cond_enter(&delete_cond); if (delete) { char tmp[MPD_PATH_MAX]; -- cgit v1.2.3