From: Amos Jeffries Date: Thu, 22 Apr 2010 13:02:17 +0000 (+1200) Subject: Author: Robert Walsh X-Git-Tag: SQUID_3_1_2~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32f90169b7511cb98fcfb167c5851fd8004ce796;p=thirdparty%2Fsquid.git Author: Robert Walsh 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. --- diff --git a/src/comm.cc b/src/comm.cc index a21e8436f3..702e6d912f 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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); } } }