diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-18 13:17:00 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-02-18 13:17:00 +0000 |
commit | f76e655ca84d9f001434b8ee96b4951df2cd5156 (patch) | |
tree | 3b0524d58cfc6cd2d3b02c5c727820e87912040f /src | |
parent | 3f964eee87e17d473651b13c3e81840f39ad2890 (diff) | |
download | rspamd-f76e655ca84d9f001434b8ee96b4951df2cd5156.tar.gz rspamd-f76e655ca84d9f001434b8ee96b4951df2cd5156.zip |
[Minor] Maps: Jitter HTTP maps load to get better chances of SSL caching
Diffstat (limited to 'src')
-rw-r--r-- | src/libserver/maps/map.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libserver/maps/map.c b/src/libserver/maps/map.c index a837b11ac..a832adc4f 100644 --- a/src/libserver/maps/map.c +++ b/src/libserver/maps/map.c @@ -1063,7 +1063,14 @@ rspamd_map_schedule_periodic (struct rspamd_map *map, int how) timeout = map->poll_timeout; if (how & RSPAMD_MAP_SCHEDULE_INIT) { - timeout = 0.0; + if (map->active_http) { + /* Spill maps load to get better chances to hit ssl cache */ + timeout = rspamd_time_jitter (0.0, 2.0); + } + else { + timeout = 0.0; + } + reason = "init scheduled check"; } else { |