diff options
-rw-r--r-- | include/modules/dns.h | 1 | ||||
-rw-r--r-- | src/coremods/core_dns.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/modules/dns.h b/include/modules/dns.h index ea443e343..a66e3c28e 100644 --- a/include/modules/dns.h +++ b/include/modules/dns.h @@ -155,7 +155,6 @@ namespace DNS , id(0) , creator(mod) { - ServerInstance->Timers.AddTimer(this); } virtual ~Request() diff --git a/src/coremods/core_dns.cpp b/src/coremods/core_dns.cpp index 91bd45b54..5493470ae 100644 --- a/src/coremods/core_dns.cpp +++ b/src/coremods/core_dns.cpp @@ -464,6 +464,9 @@ class MyManager : public Manager, public Timer, public EventHandler if (SocketEngine::SendTo(this, buffer, len, 0, &this->myserver.sa, this->myserver.sa_size()) != len) throw Exception("DNS: Unable to send query"); + + // Add timer for timeout + ServerInstance->Timers.AddTimer(req); } void RemoveRequest(DNS::Request* req) |