diff --git a/src/agent.c b/src/agent.c index 545638bb1a2c16b0f195b659a07aa022916f2f33..83b95922419a5c4e0a4efba10e2d886e2e0d1ac3 100644 --- a/src/agent.c +++ b/src/agent.c @@ -3759,9 +3759,13 @@ static void agent_upgrade_backhaul_cb(atimer_t *t) wifi_bsta_check_cac_done(a); if (a->progress_attempts == 1) - timeout = 60 * 5; /* 5 minutes */ - else if (a->progress_attempts >= 2) - timeout = 60 * 30; /* 30 minutes */ + timeout = 60; /* 1 minute */ + else if (a->progress_attempts == 2) + timeout = 4 * 60; /* 4 minutes */ + else if (a->progress_attempts == 3) + timeout = 6 * 60; /* 6 minutes */ + else if (a->progress_attempts >= 4) + timeout = 30 * 60; /* 30 minutes */ if (agent_has_downstream(a) && !a->progressing) { timer_set(&a->upgrade_backhaul_scheduler, @@ -3772,7 +3776,6 @@ static void agent_upgrade_backhaul_cb(atimer_t *t) if (!a->progressing) { agent_exec_platform_scripts("bsta_scan_on_enabled"); a->progressing = true; - a->progress_attempts++; timer_set(&a->upgrade_backhaul_scheduler, 15 * 1000); timestamp_update(&a->dynbh_last_start); } else { @@ -3792,7 +3795,7 @@ static void agent_upgrade_backhaul_cb(atimer_t *t) } a->progressing = false; - + a->progress_attempts++; timer_set(&a->upgrade_backhaul_scheduler, timeout * 1000); timestamp_update(&a->dynbh_last_end); }