commit b78731f: [Fix] Enable error multiplier on http errors

Vsevolod Stakhov vsevolod at highsecure.ru
Sat Jan 23 11:36:22 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-01-23 11:32:38 +0000
URL: https://github.com/rspamd/rspamd/commit/b78731fa8a8c4b27e669897df1610db772ed3c84 (HEAD -> master)

[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 */


More information about the Commits mailing list