]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: "Michael O'Reilly" <michael@metal.iinet.net.au>
authorwessels <>
Wed, 25 Mar 1998 12:21:47 +0000 (12:21 +0000)
committerwessels <>
Wed, 25 Mar 1998 12:21:47 +0000 (12:21 +0000)
#1. close() called on a network socket on linux doesn't block, so
there's no point in paying the cost an aioClose.

src/comm.cc

index da6d6a69d6d34c764074bc847b04b521b902655f..057920f957464b72ed34d9a772d820aee50a1a27 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.235 1998/03/24 17:29:44 wessels Exp $
+ * $Id: comm.cc,v 1.236 1998/03/25 05:21:47 wessels Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -642,7 +642,13 @@ comm_close(int fd)
     if (F->uses)               /* assume persistent connect count */
        pconnHistCount(1, F->uses);
     fd_close(fd);              /* update fdstat */
-#if USE_ASYNC_IO
+#if defined(_SQUID_LINUX_)
+    /*
+     * michael@metal.iinet.net.au sez close() on
+     * network sockets never blocks.
+     */
+    close(fd);
+#elsif USE_ASYNC_IO
     aioClose(fd);
 #else
     close(fd);