The previous fix only validated cfg->task_timeout, missing cases where
individual workers (normal, controller) override task_timeout in their
own config section. Iterate cfg->workers and check each worker's
effective timeout via its UCL options object.
if (ret) {
rspamd_worker_check_and_adjust_timeout(cfg, cfg->task_timeout);
+ /* Also check per-worker task_timeout overrides */
+ for (GList *cur = cfg->workers; cur != NULL; cur = g_list_next(cur)) {
+ struct rspamd_worker_conf *wcf = (struct rspamd_worker_conf *) cur->data;
+ if (wcf->options) {
+ const ucl_object_t *to = ucl_object_lookup(wcf->options, "task_timeout");
+ if (to == NULL) {
+ to = ucl_object_lookup(wcf->options, "check_timeout");
+ }
+ if (to != NULL) {
+ rspamd_worker_check_and_adjust_timeout(cfg, ucl_object_todouble(to));
+ }
+ }
+ }
}
if (ret) {