]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Enable error multiplier on http errors
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 23 Jan 2021 11:32:38 +0000 (11:32 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 23 Jan 2021 11:32:38 +0000 (11:32 +0000)
Issue: #3616

src/libserver/maps/map.c

index 14792753ae0dceeb1f7772e51e2e647e6ea66a15..da1995fab405f73dedc00eaeae18ee9ac57dabce 100644 (file)
@@ -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 */