]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_dns.cpp
Add a typedef for the data provider map.
[user/henk/code/inspircd.git] / src / coremods / core_dns.cpp
index 2e75a591f7c1b1acf547c2238378481a8304584a..11c2c823c890b785641c22459b7734ad21c94ff6 100644 (file)
@@ -2,7 +2,7 @@
  * InspIRCd -- Internet Relay Chat Daemon
  *
  *   Copyright (C) 2019 Robby <robby@chatbelgie.be>
- *   Copyright (C) 2015, 2017-2019 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2015, 2017-2020 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2013-2016 Attila Molnar <attilamolnar@hush.com>
  *   Copyright (C) 2013, 2015-2016 Adam <Adam@anope.org>
  *
@@ -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);