mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-13 00:56:44 +02:00
fixed queue::abort
This commit is contained in:
parent
e875555d3c
commit
06ce37be1c
3 changed files with 23 additions and 19 deletions
|
@ -115,7 +115,7 @@ bool PcmStream::sleep(int32_t ms)
|
|||
if (ms < 0)
|
||||
return true;
|
||||
std::unique_lock<std::mutex> lck(mtx_);
|
||||
return (cv_.wait_for(lck, std::chrono::milliseconds(ms)) == std::cv_status::timeout);
|
||||
return (!cv_.wait_for(lck, std::chrono::milliseconds(ms), [this] { return !active_; }));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue