From 6cc47586dbcbf21fb67be92f6736fd76ca8baffb Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 20 Apr 2012 16:40:59 +0400 Subject: [PATCH] Fix controller freezing. --- src/controller.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/controller.c b/src/controller.c index 6016a271d..628d28c1b 100644 --- a/src/controller.c +++ b/src/controller.c @@ -940,14 +940,15 @@ controller_read_socket (f_str_t * in, void *arg) } } } - if (session->state == STATE_COMMAND) { - session->state = STATE_REPLY; - } if (session->state != STATE_LEARN && session->state != STATE_LEARN_SPAM_PRE && session->state != STATE_WEIGHTS && session->state != STATE_OTHER) { if (!rspamd_dispatcher_write (session->dispatcher, END, sizeof (END) - 1, FALSE, TRUE)) { return FALSE; } + if (session->state == STATE_QUIT) { + destroy_session (session->s); + return FALSE; + } } break; -- 2.39.5