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