mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-14 09:34:32 -04:00
Fix lockups due to lack of locking around terminate_
This commit is contained in:
@@ -145,7 +145,10 @@ class Event {
|
||||
void AddFrame(const std::shared_ptr<ZMPacket>&packet);
|
||||
|
||||
void Stop() {
|
||||
terminate_ = true;
|
||||
{
|
||||
std::unique_lock<std::mutex> lck(packet_queue_mutex);
|
||||
terminate_ = true;
|
||||
}
|
||||
packet_queue_condition.notify_all();
|
||||
}
|
||||
bool Stopped() const { return terminate_; }
|
||||
|
||||
Reference in New Issue
Block a user