aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/symcache/symcache_c.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/libserver/symcache/symcache_c.cxx')
-rw-r--r--src/libserver/symcache/symcache_c.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libserver/symcache/symcache_c.cxx b/src/libserver/symcache/symcache_c.cxx
index 3214aab2e..b7514d2f3 100644
--- a/src/libserver/symcache/symcache_c.cxx
+++ b/src/libserver/symcache/symcache_c.cxx
@@ -602,8 +602,14 @@ unsigned int rspamd_symcache_item_async_inc_full(struct rspamd_task *task,
"subsystem %s (%s)",
static_item->symbol.c_str(), static_item->id,
real_dyn_item->async_events, subsystem, loc);
+ auto nevents = ++real_dyn_item->async_events;
- return ++real_dyn_item->async_events;
+ if (nevents > 1) {
+ /* Item is async */
+ static_item->internal_flags &= ~rspamd::symcache::cache_item::bit_sync;
+ }
+
+ return nevents;
}
unsigned int rspamd_symcache_item_async_dec_full(struct rspamd_task *task,