From b78731fa8a8c4b27e669897df1610db772ed3c84 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 23 Jan 2021 11:32:38 +0000 Subject: [PATCH] [Fix] Enable error multiplier on http errors Issue: #3616 --- src/libserver/maps/map.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c index 14792753a..da1995fab 100644 --- a/src/libserver/maps/map.c +++ b/src/libserver/maps/map.c @@ -1058,8 +1058,15 @@ rspamd_map_schedule_periodic (struct rspamd_map *map, int how) } else if (timeout <= 0) { /* Data is already expired, need to check */ - jittered_sec = 0.0; - reason = "expired non-trivial data"; + if (how & RSPAMD_MAP_SCHEDULE_ERROR) { + /* In case of error we still need to increase delay */ + jittered_sec = map->poll_timeout * error_mult; + reason = "expired non-trivial data (after error)"; + } + else { + jittered_sec = 0.0; + reason = "expired non-trivial data"; + } } else { /* No need to check now, wait till next_check */ -- 2.39.5