From 3cbf6b2a72218335d336c0dc2abb675f516b97eb Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Wed, 8 Feb 2006 14:10:53 +0100 Subject: [PATCH] write_to_client: error out on disconnect In order to hande the disconnect of web-clients mod_fastcgi needs not only check the return status of ap_pass_brigade() but also the connection state. Otherwise the process manager will glady keep the connection to the FastCGI process open until it is done generating data. --- mod_fastcgi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mod_fastcgi.c b/mod_fastcgi.c index 05290e1..7f236d3 100644 --- a/mod_fastcgi.c +++ b/mod_fastcgi.c @@ -933,8 +933,7 @@ static int write_to_client(fcgi_request *fr) #endif - if (rv) - { + if (rv || fr->r->connection->aborted) { ap_log_rerror(FCGI_LOG_INFO_NOERRNO, fr->r, "FastCGI: client stopped connection before send body completed"); return -1; -- 2.11.4.GIT