From 0a331a3b64b2b531422bac0767e26dfcf56a0413 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 23 Mar 2010 13:54:16 +0000 Subject: Calling OnError from Resolver's constructor is broken; just use the exception git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12657 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/dns.cpp | 5 +---- src/users.cpp | 2 ++ 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/dns.cpp b/src/dns.cpp index 8526d5be2..f6a609cc0 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -904,10 +904,7 @@ Resolver::Resolver(const std::string &source, QueryType qt, bool &cached, Module } if (this->myid == -1) { - this->OnError(RESOLVER_NSDOWN, "Nameserver is down"); - throw ModuleException("Resolver: Couldnt get an id to make a request"); - /* We shouldnt get here really */ - return; + throw ModuleException("Resolver: Couldn't get an id to make a request"); } else { diff --git a/src/users.cpp b/src/users.cpp index 5f495aafb..b188eaaed 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -113,6 +113,8 @@ void LocalUser::StartDNSLookup() catch (CoreException& e) { ServerInstance->Logs->Log("USERS", DEBUG,"Error in resolver: %s",e.GetReason()); + dns_done = true; + ServerInstance->stats->statsDnsBad++; } } -- cgit v1.2.3