diff --git a/iocore/hostdb/HostDB.cc b/iocore/hostdb/HostDB.cc index b79f74a4bdc..75ad469089d 100644 --- a/iocore/hostdb/HostDB.cc +++ b/iocore/hostdb/HostDB.cc @@ -1586,6 +1586,10 @@ HostDBContinuation::set_check_pending_dns() { Queue &q = hostDB.pending_dns_for_hash(hash.hash); this->setThreadAffinity(this_ethread()); + if (q.in(this)) { + Warning("Skip the insertion of the same continuation to pending dns"); + return false; + } HostDBContinuation *c = q.head; for (; c; c = static_cast(c->link.next)) { if (hash.hash == c->hash.hash) {