]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Calling OnError from Resolver's constructor is broken; just use the exception
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 23 Mar 2010 13:54:16 +0000 (13:54 +0000)
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>
Tue, 23 Mar 2010 13:54:16 +0000 (13:54 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12657 e03df62e-2008-0410-955e-edbf42e46eb7

src/dns.cpp
src/users.cpp

index 8526d5be22bc4735db1a51c1220b49f77700403b..f6a609cc00c3acca8a1a7c11f102a0560fade6c0 100644 (file)
@@ -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
        {
index 5f495aafbfc8f5e65c993ee7e929a407018d311a..b188eaaed30b7e7c3613a8e1c8ab2b55979688cd 100644 (file)
@@ -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++;
        }
 }