From: Vsevolod Stakhov Date: Fri, 20 Apr 2012 12:40:59 +0000 (+0400) Subject: Fix controller freezing. X-Git-Tag: 0.5.0~42 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6cc47586dbcbf21fb67be92f6736fd76ca8baffb;p=rspamd.git Fix controller freezing. --- 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;