From d5d99e268a3a258617d0e0a1127a8c5822f5cd81 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Wed, 27 Jan 2016 20:50:14 +0100 Subject: Always stop thread if running. --- src/audiocacheeventhandler.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/audiocacheeventhandler.cc b/src/audiocacheeventhandler.cc index 001f6b5..01db796 100644 --- a/src/audiocacheeventhandler.cc +++ b/src/audiocacheeventhandler.cc @@ -92,11 +92,9 @@ void AudioCacheEventHandler::stop() } running = false; - if(threaded) - { - sem.post(); - wait_stop(); - } + + sem.post(); + wait_stop(); } void AudioCacheEventHandler::setThreaded(bool threaded) -- cgit v1.2.3