From 3e6a05f4fadaa8b8b4ab6c8a970e84e63a9f27c2 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sat, 2 Mar 2013 21:36:15 +0100 Subject: m_dnsbl Fix connecting users timeouting when a dnsbl result is in the dns cache Fixes #431 reported by @killerrabbit --- src/modules/m_dnsbl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index 0f4f4c335..5e02dd0a5 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -375,6 +375,8 @@ class ModuleDNSBL : public Module snprintf(reversedipbuf, 128, "%d.%d.%d.%d", d, c, b, a); reversedip = std::string(reversedipbuf); + countExt.set(user, DNSBLConfEntries.size()); + // For each DNSBL, we will run through this lookup unsigned int i = 0; while (i < DNSBLConfEntries.size()) @@ -386,9 +388,10 @@ class ModuleDNSBL : public Module bool cached; DNSBLResolver *r = new DNSBLResolver(this, nameExt, countExt, hostname, user, DNSBLConfEntries[i], cached); ServerInstance->AddResolver(r, cached); + if (user->quitting) + break; i++; } - countExt.set(user, i); } ModResult OnSetConnectClass(LocalUser* user, ConnectClass* myclass) -- cgit v1.2.3