diff --git a/app.py b/app.py index 458d0de..a6844cb 100644 --- a/app.py +++ b/app.py @@ -108,7 +108,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 for camera: {camera_id}") break # Re-open the VideoCapture