From: Peter Zijlstra Date: Wed, 8 Feb 2006 13:10:53 +0000 (+0100) Subject: write_to_client: error out on disconnect X-Git-Url: https://repo.or.cz/w/mod_fastcgi.git/commitdiff_plain/3cbf6b2a72218335d336c0dc2abb675f516b97eb 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. --- 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;