diff --git a/app.py b/app.py index 994d36c..e4adce5 100644 --- a/app.py +++ b/app.py @@ -94,7 +94,7 @@ async def detect(websocket: WebSocket): cap.release() time.sleep(reconnect_interval) retries += 1 - if retries > max_retries: + if retries > max_retries and max_retries != -1: logging.error(f"Max retries reached after OpenCV error for camera: {camera_id}") break # Re-open the VideoCapture diff --git a/config.json b/config.json index b9ffa8f..311bbf4 100644 --- a/config.json +++ b/config.json @@ -3,5 +3,5 @@ "max_streams": 5, "target_fps": 2, "reconnect_interval_sec": 5, - "max_retries": 3 + "max_retries": -1 }