]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
read queued bytes on linux before closing a client socket to prevent
authorwessels <>
Sun, 18 Oct 1998 14:10:05 +0000 (14:10 +0000)
committerwessels <>
Sun, 18 Oct 1998 14:10:05 +0000 (14:10 +0000)
RST packets going to the browser

src/client_side.cc

index c4de90118baabcc0c684adafd59fc5a8a26c65c3..3bde962d64357b33c90aad202c8cd1d9b25c584b 100644 (file)
@@ -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