]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_dns.cpp
The init function should have the override keyword too.
[user/henk/code/inspircd.git] / src / coremods / core_dns.cpp
index 5dcc994cea048f770c94eb3ff6c1e7856a93c1b5..11c2c823c890b785641c22459b7734ad21c94ff6 100644 (file)
@@ -703,13 +703,13 @@ class MyManager : public Manager, public Timer, public EventHandler
 
        void Rehash(const std::string& dnsserver, std::string sourceaddr, unsigned int sourceport)
        {
-               if (this->GetFd() > -1)
+               if (this->HasFd())
                {
                        SocketEngine::Shutdown(this, 2);
                        SocketEngine::Close(this);
 
-                       /* Remove expired entries from the cache */
-                       this->Tick(ServerInstance->Time());
+                       // Remove all entries from the cache.
+                       cache.clear();
                }
 
                irc::sockets::aptosa(dnsserver, DNS::PORT, myserver);