mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Improve logic when retrying establishing database connection (#121047)
This commit is contained in:
parent
976cb434c9
commit
e26b4554e6
@ -958,7 +958,9 @@ class Recorder(threading.Thread):
|
|||||||
self.db_retry_wait,
|
self.db_retry_wait,
|
||||||
)
|
)
|
||||||
tries += 1
|
tries += 1
|
||||||
time.sleep(self.db_retry_wait)
|
|
||||||
|
if tries <= self.db_max_retries:
|
||||||
|
time.sleep(self.db_retry_wait)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user