From: wessels <> Date: Sun, 18 Oct 1998 14:10:05 +0000 (+0000) Subject: read queued bytes on linux before closing a client socket to prevent X-Git-Tag: SQUID_3_0_PRE1~2555 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=403028a90d7871b428c6bc9b9ca80ed1e7f76bb1;p=thirdparty%2Fsquid.git read queued bytes on linux before closing a client socket to prevent RST packets going to the browser --- diff --git a/src/client_side.cc b/src/client_side.cc index c4de90118b..3bde962d64 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.416 1998/10/17 04:34:09 rousskov Exp $ + * $Id: client_side.cc,v 1.417 1998/10/18 08:10:05 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -717,6 +717,13 @@ connStateFree(int fd, void *data) /* XXX account connState->in.buf */ pconnHistCount(0, connState->nrequests); cbdataFree(connState); +#ifdef _SQUID_LINUX_ + /* prevent those nasty RST packets */ + { + char buf[SQUID_TCP_SO_RCVBUF]; + while (read(fd, buf, SQUID_TCP_SO_RCVBUF) > 0); + } +#endif } static void