From 57b3a37fd7455eba113c1575907461d22415a1fe Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Fri, 3 Feb 2023 18:37:25 -0600 Subject: [PATCH] ensure the multiprocessing queues are emptied and closed --- frigate/app.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/frigate/app.py b/frigate/app.py index 9ad5acda9..1e5140603 100644 --- a/frigate/app.py +++ b/frigate/app.py @@ -438,3 +438,15 @@ class FrigateApp: shm = self.detection_shms.pop() shm.close() shm.unlink() + + for queue in [ + self.event_queue, + self.event_processed_queue, + self.video_output_queue, + self.detected_frames_queue, + self.recordings_info_queue, + ]: + while not queue.empty(): + queue.get_nowait() + queue.close() + queue.join_thread()