]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Robert Walsh <robert.walsh@bbn.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 22 Apr 2010 13:02:17 +0000 (01:02 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 22 Apr 2010 13:02:17 +0000 (01:02 +1200)
Bug 2848: Early Shutdown kill leads to misleading clean close with client browsers

Send TCP RST instead of FIN when the data is known to be incompletely sent.

src/comm.cc

index a21e8436f31a426295e6aed7100183038fcf4f2e..702e6d912fdeda19fd458809a81fff9325bf665e 100644 (file)
@@ -1517,7 +1517,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);
 }
@@ -2143,8 +2143,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);
         }
     }
 }