mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-26 19:06:11 +01:00
Lower onvif timeouts to 10s (#13473)
This commit is contained in:
parent
ecaba82c9d
commit
e3da5ef2d5
@ -8,6 +8,7 @@ from pathlib import Path
|
|||||||
import numpy
|
import numpy
|
||||||
from onvif import ONVIFCamera, ONVIFError
|
from onvif import ONVIFCamera, ONVIFError
|
||||||
from zeep.exceptions import Fault, TransportError
|
from zeep.exceptions import Fault, TransportError
|
||||||
|
from zeep.transports import Transport
|
||||||
|
|
||||||
from frigate.config import FrigateConfig, ZoomingModeEnum
|
from frigate.config import FrigateConfig, ZoomingModeEnum
|
||||||
from frigate.types import PTZMetricsTypes
|
from frigate.types import PTZMetricsTypes
|
||||||
@ -45,6 +46,7 @@ class OnvifController:
|
|||||||
|
|
||||||
if cam.onvif.host:
|
if cam.onvif.host:
|
||||||
try:
|
try:
|
||||||
|
transport = Transport(timeout=10, operation_timeout=10)
|
||||||
self.cams[cam_name] = {
|
self.cams[cam_name] = {
|
||||||
"onvif": ONVIFCamera(
|
"onvif": ONVIFCamera(
|
||||||
cam.onvif.host,
|
cam.onvif.host,
|
||||||
@ -55,6 +57,7 @@ class OnvifController:
|
|||||||
Path(find_spec("onvif").origin).parent / "wsdl"
|
Path(find_spec("onvif").origin).parent / "wsdl"
|
||||||
).replace("dist-packages/onvif", "site-packages"),
|
).replace("dist-packages/onvif", "site-packages"),
|
||||||
adjust_time=cam.onvif.ignore_time_mismatch,
|
adjust_time=cam.onvif.ignore_time_mismatch,
|
||||||
|
transport=transport,
|
||||||
),
|
),
|
||||||
"init": False,
|
"init": False,
|
||||||
"active": False,
|
"active": False,
|
||||||
|
Loading…
Reference in New Issue
Block a user