--------------------- PatchSet 11523 Date: 2007/07/07 01:34:10 Author: hno Branch: HEAD Tag: (none) Log: Author: Dave Dykstra Don't close passed http_port filedescriptor on reconfigure I found that -k reconfigure didn't work with -I because it closed the overridden socket. Here's another patch to fix that. Members: src/client_side.c:1.726->1.727 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid/squid/src/client_side.c,v retrieving revision 1.726 retrieving revision 1.727 diff -u -r1.726 -r1.727 --- squid/src/client_side.c 4 Jul 2007 00:12:11 -0000 1.726 +++ squid/src/client_side.c 7 Jul 2007 01:34:10 -0000 1.727 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.726 2007/07/04 00:12:11 hno Exp $ + * $Id: client_side.c,v 1.727 2007/07/07 01:34:10 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -4711,6 +4711,11 @@ } if ((NHttpSockets == 0) && opt_stdin_overrides_http_port) { fd = 0; + if (reconfiguring) { + /* this one did not get closed, just reuse it */ + HttpSockets[NHttpSockets++] = fd; + continue; + } comm_fdopen(fd, SOCK_STREAM, no_addr, @@ -4797,8 +4802,10 @@ void clientHttpConnectionsClose(void) { - int i; - for (i = 0; i < NHttpSockets; i++) { + int i = 0; + if (opt_stdin_overrides_http_port && reconfiguring) + i++; /* skip closing & reopening first port because it is overridden */ + for (; i < NHttpSockets; i++) { if (HttpSockets[i] >= 0) { debug(1, 1) ("FD %d Closing HTTP connection\n", HttpSockets[i]); comm_close(HttpSockets[i]);