From: Christos Tsantilas Date: Wed, 28 Jan 2009 18:02:36 +0000 (+0200) Subject: The idnsSentQueryVC function called as AsyncCall. There is the possibility X-Git-Tag: SQUID_3_2_0_1~1234 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c471ba877348733fdcf482a449edaf2174950d7;p=thirdparty%2Fsquid.git The idnsSentQueryVC function called as AsyncCall. There is the possibility when this function called the fd has start closing but not realy closed yet. In this case this function will try to do a comm_write (idnsDoSendQueryVC function) on sockect which closing and an assertion will triggered. An extra test needed here to test if the socket closing and if yes just return. --- diff --git a/src/dns_internal.cc b/src/dns_internal.cc index e2dd0cf9dd..02e8516414 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -40,6 +40,7 @@ #include "SquidTime.h" #include "Store.h" #include "comm.h" +#include "fde.h" #include "MemBuf.h" #include "wordlist.h" @@ -676,6 +677,9 @@ idnsSentQueryVC(int fd, char *buf, size_t size, comm_err_t flag, int xerrno, voi if (flag == COMM_ERR_CLOSING) return; + + if (fd_table[fd].closing()) + return; if (flag != COMM_OK || size <= 0) { comm_close(fd);