From: Amos Jeffries Date: Tue, 13 Apr 2010 23:29:30 +0000 (+1200) Subject: Bug 2848: Early Shutdown kill leads to misleading clean close with client browsers X-Git-Tag: SQUID_3_2_0_1~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=468fe1b557c2610ee57961e5140ef171fe6c2b62;p=thirdparty%2Fsquid.git 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 1e8ca109ad..17de509393 100644 --- a/src/comm.cc +++ b/src/comm.cc @@ -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); } } }