aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2012-04-20 16:40:59 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2012-04-20 16:40:59 +0400
commit6cc47586dbcbf21fb67be92f6736fd76ca8baffb (patch)
tree3b3705881700867121b84d87d3aa70d3b452ebe7
parent80efd10c7fda505905f960c73ce567c57e91a86b (diff)
downloadrspamd-6cc47586dbcbf21fb67be92f6736fd76ca8baffb.tar.gz
rspamd-6cc47586dbcbf21fb67be92f6736fd76ca8baffb.zip
Fix controller freezing.
-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;