diff options
Diffstat (limited to 'src/libserver/events.c')
-rw-r--r-- | src/libserver/events.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/events.c b/src/libserver/events.c index a15338e7a..9fa2c69c1 100644 --- a/src/libserver/events.c +++ b/src/libserver/events.c @@ -238,6 +238,11 @@ rspamd_session_remove_event (struct rspamd_async_session *session, return; } + if (!RSPAMD_SESSION_CAN_ADD_EVENT (session)) { + /* Session is already cleaned up, ignore this */ + return; + } + /* Search for event */ search_ev.fin = fin; search_ev.user_data = ud; |