From 24bc7297b74b1f70554188e25d3c6a8037016e58 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 17 May 2018 18:04:07 +0100 Subject: [PATCH] [Fix] Fix cached maps logic --- src/libutil/map.c | 6 +++--- 1 file 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); } -- 2.39.5