]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
/* If there is a callback, the callback is responsible to close
authorwessels <>
Sat, 25 Oct 1997 22:41:22 +0000 (22:41 +0000)
committerwessels <>
Sat, 25 Oct 1997 22:41:22 +0000 (22:41 +0000)
 * the FD, otherwise we do it ourseves. */

src/errorpage.cc

index 276d5f546d1e16d579a94807d47eabfb4380b0f8..826bb679858fe04bb27b30de4ac56ca25d3d9402 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.84 1997/10/24 18:10:36 wessels Exp $
+ * $Id: errorpage.cc,v 1.85 1997/10/25 16:41:22 wessels Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -276,6 +276,8 @@ errorAppendEntry(StoreEntry * entry, ErrorState * err)
        mem->reply->code = err->http_status;
 }
 
+/* If there is a callback, the callback is responsible to close
+ * the FD, otherwise we do it ourseves. */
 static void
 errorSendComplete(int fd, char *buf, int size, int errflag, void *data)
 {
@@ -283,7 +285,8 @@ errorSendComplete(int fd, char *buf, int size, int errflag, void *data)
     debug(4, 3) ("errorSendComplete: FD %d, size=%d\n", fd, size);
     if (err->callback)
        err->callback(fd, err->callback_data, size);
+    else
+       comm_close(fd);
     cbdataUnlock(err);
     errorStateFree(err);
-    comm_close(fd);
 }