修复:重连上限后停止循环,不再每秒刷日志

重连次数达到上限后 break 退出读帧循环,
而不是 sleep(1) + continue 无限刷错误日志。
This commit is contained in:
2026-03-24 09:00:19 +08:00
parent ef4cb0536a
commit 3681f35b69

View File

@@ -181,8 +181,7 @@ class RTSPStreamReader:
while not self._stop_event.is_set():
if not self._connected:
if not self._reconnect():
time.sleep(1)
continue
break
try:
ret, frame = self._cap.read()