]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
The idnsSentQueryVC function called as AsyncCall. There is the possibility
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 28 Jan 2009 18:02:36 +0000 (20:02 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Wed, 28 Jan 2009 18:02:36 +0000 (20:02 +0200)
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.

src/dns_internal.cc

index e2dd0cf9dddf838a0f85777bb367cd46c076ba7c..02e85164145e491fc728aac048f23c37c592c56e 100644 (file)
@@ -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);