On Thursday 18 March 2010, Ruediger Pluem wrote: > On 17.03.2010 21:08, [email protected] wrote: > > Author: sf > > Date: Wed Mar 17 20:08:42 2010 > > New Revision: 924455 > > > > URL: http://svn.apache.org/viewvc?rev=924455&view=rev > > Log: > > If the client disconnects and the backend continues to send data > > fast, forcibly close the backend connection. > > > > Modified: > > httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c > > > > Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c > > URL: > > http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_ > >proxy_connect.c?rev=924455&r1=924454&r2=924455&view=diff > > ================================================================= > >============= --- > > httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c (original) > > +++ httpd/httpd/trunk/modules/proxy/mod_proxy_connect.c Wed Mar > > 17 20:08:42 2010 @@ -472,7 +477,10 @@ static int > > proxy_connect_handler(request * Close the socket and clean up > > */ > > > > - ap_lingering_close(backconn); > > + if (client_error) > > + apr_socket_close(sock); > > Why do we need to close the socket to the client? IMHO this should > be done by the regular mechanism.
This is not the the socket to the client but the socket to the backend. Probably it would be done by the pool cleanup anyway, but the goal is to avioid a lingering close which would just be a waste of bandwidth. Closing the socket explicitly seemed to be the right thing to do.
