Преглед на файлове

prevent the camera process from hanging

Blake Blackshear преди 4 години
родител
ревизия
c960914ec3
променени са 1 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. 5 1
      frigate/edgetpu.py

+ 5 - 1
frigate/edgetpu.py

@@ -177,7 +177,11 @@ class RemoteObjectDetector():
         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: