diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-03 12:46:32 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-03 12:46:32 +0000 |
commit | 5f7111cfe60622a9ea7d6d9503fcd04c900f21fe (patch) | |
tree | f8ab7f7fe0a1b322366cbc223185f3038037340a | |
parent | 43ecc1dafc4f0750aea2e0db987280254ddf930b (diff) | |
download | rspamd-5f7111cfe60622a9ea7d6d9503fcd04c900f21fe.tar.gz rspamd-5f7111cfe60622a9ea7d6d9503fcd04c900f21fe.zip |
[Minor] Do not start new symbols when task is being destroyed/cleaned
-rw-r--r-- | src/libserver/rspamd_symcache.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index 708fc2afc..42ec9bc85 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -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)) { |