{
struct rspamd_task *task = (struct rspamd_task *) conn->ud;
- if (task->state == CLOSING_CONNECTION || task->state == WRITING_REPLY) {
+ if (task->state == CLOSING_CONNECTION) {
/* We are done here */
msg_debug ("normally closing connection from: %s",
rspamd_inet_address_to_string (task->client_addr));
/* Forcefully set the state */
task->state = CLOSING_CONNECTION;
}
+ else if (task->state == WRITING_REPLY) {
+ msg_debug ("still writing reply to: %s",
+ rspamd_inet_address_to_string (task->client_addr));
+ task->state = CLOSING_CONNECTION;
+ }
else {
/*
* If all filters have finished their tasks, this function will trigger