The unified diff between revisions [c025ed65..] and [015a028d..] is displayed below. It can also be downloaded as a raw diff.

#
#
# patch "src/client_side.c"
#  from [0b08448d363c94b62457c0905f5f31ea7e4d61af]
#    to [ae2ea32826ed115aa872f1a0edc914261105eb63]
#
# patch "src/comm_kqueue.c"
#  from [85ce34a77bc1bc8507541e04cf830e98f1aebf48]
#    to [13d45291e8588877468ecfbd31dba7c641119f83]
#
# patch "src/comm_select.c"
#  from [5c6578f4d4b7473343347d251b23135717bfd543]
#    to [55c7e734704d577e5b38ba134b5e02e735a0d847]
#
============================================================
--- src/client_side.c	0b08448d363c94b62457c0905f5f31ea7e4d61af
+++ src/client_side.c	ae2ea32826ed115aa872f1a0edc914261105eb63
@@ -3085,6 +3085,9 @@ clientReadRequest(int fd, void *data)
 	conn->defer.until = squid_curtime + 1;
 	conn->defer.n++;
 	fd_note(fd, "half-closed");
+#if HAVE_EVENTNETIO
+	commDeferFD(fd);
+#endif
 	/* There is one more close check at the end, to detect aborted
 	 * (partial) requests. At this point we can't tell if the request
 	 * is partial.
============================================================
--- src/comm_kqueue.c	85ce34a77bc1bc8507541e04cf830e98f1aebf48
+++ src/comm_kqueue.c	13d45291e8588877468ecfbd31dba7c641119f83
@@ -236,6 +236,7 @@ comm_kqueue(int msec)
     if (squid_curtime > last_timeout) {
         last_timeout = squid_curtime;
         checkTimeouts();
+        commBackon();
     }
     if (num == 0)
         return COMM_OK;		/* No error.. */
@@ -289,6 +290,7 @@ commDeferFD(int fd)

 	assert(fd >= 0);
 	F = &fd_table[fd];
+	debug(5, 3) ("commDeferFD: %d\n", fd);

 	/* Find a free slot in the backoff_fds list */
 	for (i = 0; i < FD_SETSIZE; i++) {
@@ -311,9 +313,11 @@ commResumeFD(int fd)
 {
 	fde *F = &fd_table[fd];

+	debug(5, 3) ("commResumeFD: %d, handler %p, data %p\n", fd, F->read_handler, F->read_data);
+
 	/* If the FD has been modified then do nothing */
 	if(!(F->read_handler) || !(F->comm_backoff)) {
-		debug(5, 2) ("commResumeFD: fd=%d ignoring read_handler=%p, comm_backoff=%d\n",fd,F->read_handler,F->comm_backoff);
+		debug(5, 3) ("commResumeFD: fd=%d ignoring read_handler=%p, comm_backoff=%d\n",fd,F->read_handler,F->comm_backoff);
 		F->comm_backoff=0;
 		return;
 	}
============================================================
--- src/comm_select.c	5c6578f4d4b7473343347d251b23135717bfd543
+++ src/comm_select.c	55c7e734704d577e5b38ba134b5e02e735a0d847
@@ -1472,12 +1472,15 @@ commBackon() {
     int fd;
     int j=0;

+    debug(5, 2) ("commBackon(): called\n");
+
     for(i=0;i<FD_SETSIZE;i++) {
 	if(backoff_fds[i]) {
 	    /* record the fd and zero the descriptor */
 	    fd=backoff_fds[i];
 	    F=&fd_table[fd];
 	    backoff_fds[i]=0;
+            debug(5, 3)("commBackon(): Checking FD %d\n", fd);

 	    /* If the fd is no longer backed off, ignore */
 	    if(!(F->comm_backoff)) {
@@ -1488,10 +1491,11 @@ commBackon() {
 	       the list and continue */
 	    if(commDeferRead(fd) == 1) {
 		backoff_fds[j++]=fd;
+	        debug(5, 3) ("commEpollBackon: Defer again: fd=%d\n",fd);
 		continue;
 	    }

-	    debug(5, 4) ("commEpollBackon: fd=%d\n",fd);
+	    debug(5, 3) ("commEpollBackon: Resume: fd=%d\n",fd);

 	    /* Resume operations for this fd */
 	    commResumeFD(fd);