zizhong commented on a change in pull request #7117:
URL: https://github.com/apache/trafficserver/pull/7117#discussion_r472779377



##########
File path: iocore/hostdb/HostDB.cc
##########
@@ -1588,6 +1588,12 @@ HostDBContinuation::set_check_pending_dns()
   this->setThreadAffinity(this_ethread());
   HostDBContinuation *c = q.head;
   for (; c; c = static_cast<HostDBContinuation *>(c->link.next)) {
+    if (c == this) {
+      Warning("Skip the insertion of the same continuation to pending dns");
+      return false;
+    }
+  }
+  for (c = q.head; c; c = static_cast<HostDBContinuation *>(c->link.next)) {
     if (hash.hash == c->hash.hash) {

Review comment:
       @oknet you suggested using in_or_enqueue(), however, if the continuation 
is not in the list, we need to check the hash matched or not. I guess the 
latest version of using in() works well. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to