diff options
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/map.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c index 0019aaa90..fad48aeab 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -1095,13 +1095,19 @@ rspamd_map_common_http_callback (struct rspamd_map *map, return; } - else if (rspamd_map_read_cached (map, bk, periodic, data->host)) { - /* Switch to the next backend */ - periodic->cur_backend ++; - data->last_modified = map->cache->last_modified; - rspamd_map_periodic_callback (-1, EV_TIMEOUT, periodic); + else { + if (map->active_http && + data->last_modified > map->cache->last_modified) { + goto check; + } + else if (rspamd_map_read_cached (map, bk, periodic, data->host)) { + /* Switch to the next backend */ + periodic->cur_backend++; + data->last_modified = map->cache->last_modified; + rspamd_map_periodic_callback (-1, EV_TIMEOUT, periodic); - return; + return; + } } } else if (!map->active_http) { |