mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 18:57:06 +00:00
Reset the stream backoff timeout when the url updates (#66426)
Reset the stream backoff timeout when the url updates, meant to improve the retry behavior for nest cameras. The problem is the nest url updates faster than the stream reset time so the wait timeout never resets if there is a temporarily problem with the new url. In particular this *may* help with the flaky cloud nest urls, but seems more correct otherwise.
This commit is contained in:
parent
ac3c5db989
commit
b016259206
@ -344,7 +344,9 @@ class Stream:
|
||||
stream_state.discontinuity()
|
||||
if not _should_retry() or self._thread_quit.is_set():
|
||||
if self._fast_restart_once:
|
||||
# The stream source is updated, restart without any delay.
|
||||
# The stream source is updated, restart without any delay and reset the retry
|
||||
# backoff for the new url.
|
||||
wait_timeout = 0
|
||||
self._fast_restart_once = False
|
||||
self._thread_quit.clear()
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user