Skip to content

Commit

Permalink
prevent the camera process from hanging
Browse files Browse the repository at this point in the history
  • Loading branch information
blakeblackshear committed Oct 12, 2020
1 parent 20cff85 commit 45e9f84
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frigate/edgetpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 45e9f84

Please sign in to comment.