Fix bootstrap timeout (120 sec), off by a factor 10 (1200 sec)

Regression in v4.5 release cycle, no changelog notice needed.

Reported as part of issue #378 by Alexander Zangerl.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg committed 2023-10-30 13:50:43 +01:00
1 parent 68f44f7a97
commit fbb3779d17
1 file changed
+4 -4
+4 -4
View File
@@ -52,19 +52,19 @@ sm_t sm;
*/ */
static void sm_check_bootstrap(void *work) static void sm_check_bootstrap(void *work)
{ {
static int cnt = 120 * 10; /* We run with 100ms period */ static int timeout = 120;
int level = cfglevel; int level = cfglevel;
dbg("Step all services ..."); dbg("Step all services ...");
service_step_all(SVC_TYPE_ANY); service_step_all(SVC_TYPE_ANY);
if (cnt-- > 0 && !service_completed()) { if (timeout-- > 0 && !service_completed()) {
dbg("Not all bootstrap run/tasks have completed yet ... %d", cnt); dbg("Not all bootstrap run/tasks have completed yet ... %d", timeout);
schedule_work(work); schedule_work(work);
return; return;
} }
if (cnt > 0) if (timeout > 0)
dbg("All run/task have completed, resuming bootstrap."); dbg("All run/task have completed, resuming bootstrap.");
else else
dbg("Timeout, resuming bootstrap."); dbg("Timeout, resuming bootstrap.");