]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2848: Early Shutdown kill leads to misleading clean close with client browsers
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 13 Apr 2010 23:29:30 +0000 (11:29 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 13 Apr 2010 23:29:30 +0000 (11:29 +1200)
Send TCP RST instead of FIN when the data is known to be incompletely sent.

src/comm.cc

index 1e8ca109adf359f8d23b189438255d75b42ab827..17de5093936b603e0faf4a5a10805b56f208491a 100644 (file)
@@ -1426,7 +1426,7 @@ comm_reset_close(int fd)
     L.l_linger = 0;
 
     if (setsockopt(fd, SOL_SOCKET, SO_LINGER, (char *) &L, sizeof(L)) < 0)
-        debugs(50, 0, "commResetTCPClose: FD " << fd << ": " << xstrerror());
+        debugs(50, DBG_CRITICAL, "ERROR: Closing FD " << fd << " with TCP RST: " << xstrerror());
 
     comm_close(fd);
 }
@@ -2041,8 +2041,8 @@ commCloseAllSockets(void)
             debugs(5, 5, "commCloseAllSockets: FD " << fd << ": Calling timeout handler");
             ScheduleCallHere(callback);
         } else {
-            debugs(5, 5, "commCloseAllSockets: FD " << fd << ": calling comm_close()");
-            comm_close(fd);
+            debugs(5, 5, "commCloseAllSockets: FD " << fd << ": calling comm_reset_close()");
+            comm_reset_close(fd);
         }
     }
 }