From 4f3190fe5e25b09f3bf2eb4a82015efd12824e04 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Sat, 25 Oct 1997 22:41:22 +0000 Subject: [PATCH] /* If there is a callback, the callback is responsible to close * the FD, otherwise we do it ourseves. */ --- src/errorpage.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/errorpage.cc b/src/errorpage.cc index 276d5f546d..826bb67985 100644 --- a/src/errorpage.cc +++ b/src/errorpage.cc @@ -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); } -- 2.47.3