On Wed, 5 Mar 1997, Rob Hartill wrote:
> ---------- Forwarded message ----------
> Date: Tue, 4 Mar 1997 14:43:53 -0700
> From: Vladas <vladas@systemsix.com>
> To: apache-bugs@apache.org
>
> Apache correction suggestion:
>
>
> Just to consider another way of getting rid of
> intermediate statuses of TCP connections we inserted
> close after unsuccessful operation. It happens on our
> system ( USIX 2.0.8 ) if client is constantly clicking
> on reload button on Netscape 3.0 Gold.
>
>
> line 1730:
>
> if (getsockname(csd, &sa_server, &clen) < 0) {
> log_unixerr("getsockname", NULL, NULL, server_conf);
> /* Helps to clean-up TCP connections*/
> close (csd);
> continue;
> }
>
> sock_disable_nagle(csd);
>
> Thanks for apache 1.2b7.
>
> vladas@systemsix.com
Yep this fixes a file descriptor leak. Patch included.
Dean
Index: http_main.c
===================================================================
RCS file: /export/home/cvs/apache/src/http_main.c,v
retrieving revision 1.127
diff -c -3 -r1.127 http_main.c
*** http_main.c 1997/03/04 21:44:38 1.127
--- http_main.c 1997/03/06 07:29:22
***************
*** 1735,1740 ****
--- 1735,1741 ----
clen = sizeof(sa_server);
if (getsockname(csd, &sa_server, &clen) < 0) {
log_unixerr("getsockname", NULL, NULL, server_conf);
+ close(csd);
continue;
}
|