diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-17 18:04:07 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-05-17 18:04:07 +0100 |
commit | 24bc7297b74b1f70554188e25d3c6a8037016e58 (patch) | |
tree | 561e689efa7d3dc3fbca5e66b2570947c9cfcbd0 /src | |
parent | 1f6ae62b7e9fefd84102b7063a29555bd32eaa8c (diff) | |
download | rspamd-24bc7297b74b1f70554188e25d3c6a8037016e58.tar.gz rspamd-24bc7297b74b1f70554188e25d3c6a8037016e58.zip |
[Fix] Fix cached maps logic
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c index 1e8f70f7e..577933c25 100644 --- a/src/libutil/map.c +++ b/src/libutil/map.c @@ -346,11 +346,11 @@ rspamd_map_cache_cb (gint fd, short what, gpointer ud) /* We have another update, so this cache element is obviously expired */ /* Important: we do not set cache availability to zero here */ MAP_RELEASE (cache_cbd->shm, "rspamd_http_map_cached_cbdata"); - msg_debug_map ("cached data is now expired (gen mismatch) for %s", map->name); + msg_info_map ("cached data is now expired (gen mismatch) for %s", map->name); event_del (&cache_cbd->timeout); g_free (cache_cbd); } - else if (cache_cbd->data->last_checked > cache_cbd->last_checked) { + else if (cache_cbd->data->last_checked >= cache_cbd->last_checked) { /* * We checked map but we have not found anything more recent, * reschedule cache check @@ -363,7 +363,7 @@ rspamd_map_cache_cb (gint fd, short what, gpointer ud) else { g_atomic_int_set (&map->cache->available, 0); MAP_RELEASE (cache_cbd->shm, "rspamd_http_map_cached_cbdata"); - msg_debug_map ("cached data is now expired for %s", map->name); + msg_info_map ("cached data is now expired for %s", map->name); event_del (&cache_cbd->timeout); g_free (cache_cbd); } |