aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/worker.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/worker.c b/src/worker.c
index ec8fb464c..e59054414 100644
--- a/src/worker.c
+++ b/src/worker.c
@@ -149,7 +149,7 @@ rspamd_worker_finish_handler (struct rspamd_http_connection *conn,
{
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));
@@ -167,6 +167,11 @@ rspamd_worker_finish_handler (struct rspamd_http_connection *conn,
/* 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