mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-26 08:18:28 -04:00
Fix lockups due to lack of locking around terminate_
This commit is contained in:
1 parent
19d823497e
commit
585a01735a
1 file changed
+4
-1
+4
-1
@@ -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