mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-08-23 15:23:46 +08:00
Add delay before retrying sunnylinkd main
The update introduces a 60-second delay before retrying the execution of sunnylinkd main when SunnylinkEnabled is false. This aims to prevent the immediate termination of the process when SunnylinkEnabled is turned off, allowing for a smoother transition.
This commit is contained in:
@@ -205,7 +205,8 @@ def main(exit_event: threading.Event = None):
|
||||
while exit_event is None or not exit_event.is_set():
|
||||
try:
|
||||
if not is_sunnylink_enabled:
|
||||
cloudlog.warning("Exiting sunnylinkd.main as SunnylinkEnabled is False")
|
||||
cloudlog.debug("Exiting sunnylinkd.main as SunnylinkEnabled is False but will retry in 60 seconds")
|
||||
time.sleep(60)
|
||||
break
|
||||
|
||||
if conn_start is None:
|
||||
|
||||
Reference in New Issue
Block a user