]> source.dussan.org Git - rspamd.git/commitdiff
Fix controller freezing.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 20 Apr 2012 12:40:59 +0000 (16:40 +0400)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Fri, 20 Apr 2012 12:40:59 +0000 (16:40 +0400)
src/controller.c

index 6016a271d15ddcaa8b3033d0840c9c5592c7d110..628d28c1b78ace5227347b5015c6e496fa83ad8c 100644 (file)
@@ -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;