mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-06 05:27:44 +03:00
catch onvif error
This commit is contained in:
parent
b288e47576
commit
7a330d5940
@ -86,7 +86,11 @@ class OnvifController:
|
|||||||
|
|
||||||
async def _init_onvif(self, camera_name: str) -> bool:
|
async def _init_onvif(self, camera_name: str) -> bool:
|
||||||
onvif: ONVIFCamera = self.cams[camera_name]["onvif"]
|
onvif: ONVIFCamera = self.cams[camera_name]["onvif"]
|
||||||
await onvif.update_xaddrs()
|
try:
|
||||||
|
await onvif.update_xaddrs()
|
||||||
|
except Exception as e:
|
||||||
|
logger.error(f"Onvif connection failed for {camera_name}: {e}")
|
||||||
|
return False
|
||||||
|
|
||||||
# create init services
|
# create init services
|
||||||
media: ONVIFService = await onvif.create_media_service()
|
media: ONVIFService = await onvif.create_media_service()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user