diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-01-27 20:50:14 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2016-01-27 20:50:14 +0100 |
commit | d5d99e268a3a258617d0e0a1127a8c5822f5cd81 (patch) | |
tree | 1e201f96cc984021056ceed37c1500c90aa60c3e /src | |
parent | 724d86923af138f216e4192b8f00ee5a197fd2a5 (diff) |
Always stop thread if running.
Diffstat (limited to 'src')
-rw-r--r-- | src/audiocacheeventhandler.cc | 8 |
1 files 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) |