From 45e9f84f6ced6c2617535dd0ddd657f00b13d67b Mon Sep 17 00:00:00 2001 From: Blake Blackshear Date: Sun, 11 Oct 2020 21:28:58 -0500 Subject: [PATCH] prevent the camera process from hanging --- frigate/edgetpu.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frigate/edgetpu.py b/frigate/edgetpu.py index 90f9a7aea8..5398b91e59 100644 --- a/frigate/edgetpu.py +++ b/frigate/edgetpu.py @@ -177,7 +177,11 @@ def detect(self, tensor_input, threshold=.4): self.np_shm[:] = tensor_input[:] self.event.clear() self.detection_queue.put(self.name) - self.event.wait() + result = self.event.wait(timeout=10.0) + + # if it timed out + if result is None: + return detections for d in self.out_np_shm: if d[1] < threshold: