Skip to content

Commit

Permalink
Fix bootstrap timeout (120 sec), off by a factor 10 (1200 sec)
Browse files Browse the repository at this point in the history
Regression in v4.5 release cycle, no changelog notice needed.

Reported as part of issue #378 by Alexander Zangerl.

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Oct 30, 2023
1 parent 68f44f7 commit fbb3779
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/sm.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ sm_t sm;
*/
static void sm_check_bootstrap(void *work)
{
static int cnt = 120 * 10; /* We run with 100ms period */
static int timeout = 120;
int level = cfglevel;

dbg("Step all services ...");
service_step_all(SVC_TYPE_ANY);

if (cnt-- > 0 && !service_completed()) {
dbg("Not all bootstrap run/tasks have completed yet ... %d", cnt);
if (timeout-- > 0 && !service_completed()) {
dbg("Not all bootstrap run/tasks have completed yet ... %d", timeout);
schedule_work(work);
return;
}

if (cnt > 0)
if (timeout > 0)
dbg("All run/task have completed, resuming bootstrap.");
else
dbg("Timeout, resuming bootstrap.");
Expand Down

0 comments on commit fbb3779

Please sign in to comment.