Re: squid-1.2beta22 eating gobs of CPU [patch]

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Mon, 20 Jul 1998 06:46:48 +0200

Chris Wedgwood wrote:

> OK, I've found the thread about it - but no patch(es).

I have not found the patch referred either.

> If somebody would like to mail one over and save me some effort,
> it would be much apprectaed.

Here is a small patch, based on the description Dancer sent.

/Henrik

    [ Part 2: "Attached Text" ]

Index: squid/src/comm.c
diff -u squid/src/comm.c:1.1.1.21 squid/src/comm.c:1.1.1.21.2.1
--- squid/src/comm.c:1.1.1.21 Thu Jun 4 00:22:05 1998
+++ squid/src/comm.c Mon Jul 20 06:42:27 1998
@@ -884,7 +884,7 @@
             int revents;
             if (((revents = pfds[i].revents) == 0) || ((fd = pfds[i].fd) == -1))
                 continue;
- if (fdIsHttpOrIcp(fd))
+ if (fdIsHttpOrIcp(fd) && !FD_ISSET(fd, &writefds))
                 continue;
             if (revents & (POLLRDNORM | POLLIN | POLLHUP | POLLERR)) {
                 debug(5, 6) ("comm_poll: FD %d ready for reading\n", fd);
@@ -1035,7 +1035,7 @@
         for (fd = 0; fd < maxfd; fd++) {
             if (!FD_ISSET(fd, &readfds) && !FD_ISSET(fd, &writefds))
                 continue;
- if (fdIsHttpOrIcp(fd))
+ if (fdIsHttpOrIcp(fd) && !FD_ISSET(fd, &writefds))
                 continue;
             if (FD_ISSET(fd, &readfds)) {
                 debug(5, 6) ("comm_select: FD %d ready for reading\n", fd);
Received on Tue Jul 29 2003 - 13:15:51 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:49 MST