]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dns.cpp
Change around some dns stuff (dont use this yet)
[user/henk/code/inspircd.git] / src / dns.cpp
index ca08b93ba8063e0a902ab72f86a44bb208722b6a..5a79d0d2eb1b79910107451d0d69fc5b36495b76 100644 (file)
@@ -126,7 +126,12 @@ class RequestTimeout : public InspTimer
                        /* Still exists, whack it */
                        if (rl.find(watchid)->second == watch)
                        {
-                               watch->OnError(RESOLVER_TIMEOUT, "Request timed out");
+                               if (ServerInstance->Res->Classes[watchid])
+                               {
+                                       ServerInstance->Res->Classes[watchid]->OnError(RESOLVER_TIMEOUT, "Request timed out");
+                                       delete ServerInstance->Res->Classes[watchid];
+                                       ServerInstance->Res->Classes[watchid] = NULL;
+                               }
                                rl.erase(rl.find(watchid));
                                delete watch;
                                ServerInstance->Log(DEBUG, "DNS timeout on %08x squished pointer", watch);