There are two cases in softwareupdater.py where there could potentially be extremely fast looping, either intentionally for small periods of time or unintentionally if an error occurred in just the wrong place. We should add a sleep in both of these cases to minimize the impact of the many loop repetitions.
The first case is in software_updater_start() where there is a loop that repeatedly checks for a file to be deleted.
The second case is in the try/except which wraps main(). If an exception happened early enough in main() and the exception was recurring, it could cause fast looping.
Adding small periods of sleep'ing is only to minimize the impact on clients in these cases. Were these situations to actually occur for an extended period of time, there would be a critical bug causing it.
There are two cases in softwareupdater.py where there could potentially be extremely fast looping, either intentionally for small periods of time or unintentionally if an error occurred in just the wrong place. We should add a sleep in both of these cases to minimize the impact of the many loop repetitions.
The first case is in software_updater_start() where there is a loop that repeatedly checks for a file to be deleted.
The second case is in the try/except which wraps main(). If an exception happened early enough in main() and the exception was recurring, it could cause fast looping.
Adding small periods of sleep'ing is only to minimize the impact on clients in these cases. Were these situations to actually occur for an extended period of time, there would be a critical bug causing it.