]> git.pld-linux.org Git - packages/squid.git/blob - squid-2.5.STABLE4-pconn_post.patch
- SEGV fix
[packages/squid.git] / squid-2.5.STABLE4-pconn_post.patch
1 Index: squid/src/forward.c
2 diff -c squid/src/forward.c:1.82.2.7 squid/src/forward.c:1.82.2.8
3 *** squid/src/forward.c:1.82.2.7        Tue Dec  9 14:51:32 2003
4 --- squid/src/forward.c Sat Dec 13 09:48:39 2003
5 ***************
6 *** 391,398 ****
7         ftimeout = 5;
8       if (ftimeout < ctimeout)
9         ctimeout = ftimeout;
10 !     if (fwdCheckRetriable(fwdState)) {
11 !       if ((fd = pconnPop(host, port)) >= 0) {
12             debug(17, 3) ("fwdConnectStart: reusing pconn FD %d\n", fd);
13             fwdState->server_fd = fd;
14             fwdState->n_tries++;
15 --- 391,398 ----
16         ftimeout = 5;
17       if (ftimeout < ctimeout)
18         ctimeout = ftimeout;
19 !     if ((fd = pconnPop(host, port)) >= 0) {
20 !       if (fwdCheckRetriable(fwdState)) {
21             debug(17, 3) ("fwdConnectStart: reusing pconn FD %d\n", fd);
22             fwdState->server_fd = fd;
23             fwdState->n_tries++;
24 ***************
25 *** 401,406 ****
26 --- 401,412 ----
27             comm_add_close_handler(fd, fwdServerClosed, fwdState);
28             fwdConnectDone(fd, COMM_OK, fwdState);
29             return;
30 +       } else {
31 +           /* Discard the persistent connection to not cause
32 +            * a imbalance in number of conenctions open if there
33 +            * is a lot of POST requests
34 +            */
35 +           comm_close(fd);
36         }
37       }
38   #if URL_CHECKSUM_DEBUG
This page took 0.081749 seconds and 3 git commands to generate.