summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/controller.c7
1 files 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;