| 431 | } |
| 432 | |
| 433 | static void host_http_schedule_retry(host_state_t *host, uint64_t now_ms, const char *reason) { |
| 434 | uint32_t delay = |
| 435 | host->http_retry_delay_ms ? host->http_retry_delay_ms : HOST_HTTP_RETRY_INITIAL_MS; |
| 436 | host->http_retry_at_ms = host_deadline_from(now_ms, delay); |
| 437 | if (delay > host->http_largest_scheduled_retry_ms) { |
| 438 | host->http_largest_scheduled_retry_ms = delay; |
| 439 | } |
| 440 | host->http_retry_delay_ms = |
| 441 | delay >= HOST_HTTP_RETRY_MAX_MS / 2U ? HOST_HTTP_RETRY_MAX_MS : delay * 2U; |
| 442 | char delay_text[32]; |
| 443 | (void)snprintf(delay_text, sizeof(delay_text), "%u", delay); |
| 444 | cbm_log_warn("ui.retry_scheduled", "reason", reason, "delay_ms", delay_text); |
| 445 | } |
| 446 | |
| 447 | static void host_http_reconcile_at(host_state_t *host, uint64_t now_ms, bool force_config_load) { |
| 448 | if (!host || !host->http_ops) { |
no test coverage detected