]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not start new symbols when task is being destroyed/cleaned
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 3 Dec 2018 12:46:32 +0000 (12:46 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 3 Dec 2018 12:46:32 +0000 (12:46 +0000)
src/libserver/rspamd_symcache.c

index 708fc2afc02aa42e57ad44fbaf5a4d421c2c1c15..42ec9bc85bee68877bf872b8dcf1fda16c4a5e60 100644 (file)
@@ -1357,6 +1357,14 @@ rspamd_symcache_check_symbol (struct rspamd_task *task,
                return TRUE;
        }
 
+       if (rspamd_session_blocked (task->s)) {
+               /*
+                * We cannot add new events as session is either destroyed or
+                * being cleaned up.
+                */
+               return TRUE;
+       }
+
        g_assert (!item->is_virtual);
        g_assert (item->specific.normal.func != NULL);
        if (CHECK_START_BIT (checkpoint, dyn_item)) {