From 1fa2007b649e0746f452dcf7862961fe4afe5020 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 15 Nov 2013 17:42:07 +0000 Subject: [PATCH] Set task dispatcher properly during learning. --- src/controller.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/controller.c b/src/controller.c index 6c0480e62..8af87c5a4 100644 --- a/src/controller.c +++ b/src/controller.c @@ -1475,6 +1475,8 @@ controller_read_socket (f_str_t * in, void *arg) } /* Set up async session */ task->s = new_async_session (task->task_pool, fin_learn_task, restore_learn_task, free_task_hard, task); + task->dispatcher = session->dispatcher; + session->learn_task = task; r = process_filters (task); if (r == -1) { session->state = STATE_REPLY; @@ -1498,8 +1500,6 @@ controller_read_socket (f_str_t * in, void *arg) } else { session->state = STATE_LEARN_SPAM; - task->dispatcher = session->dispatcher; - session->learn_task = task; rspamd_dispatcher_pause (session->dispatcher); } break; -- 2.39.5