mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add timeout to mjpeg streams
This commit is contained in:
parent
71157dbec9
commit
2508e9f9ff
@ -46,10 +46,9 @@ class MjpegCamera(Camera):
|
|||||||
return requests.get(self._mjpeg_url,
|
return requests.get(self._mjpeg_url,
|
||||||
auth=HTTPBasicAuth(self._username,
|
auth=HTTPBasicAuth(self._username,
|
||||||
self._password),
|
self._password),
|
||||||
stream=True)
|
stream=True, timeout=10)
|
||||||
else:
|
else:
|
||||||
return requests.get(self._mjpeg_url,
|
return requests.get(self._mjpeg_url, stream=True, timeout=10)
|
||||||
stream=True)
|
|
||||||
|
|
||||||
def camera_image(self):
|
def camera_image(self):
|
||||||
"""Return a still image response from the camera."""
|
"""Return a still image response from the camera."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user