aboutsummaryrefslogtreecommitdiffstats
path: root/src/dns.cpp
diff options
context:
space:
mode:
authorGravatar brain2006-07-14 11:17:42 +0000
committerGravatar brain2006-07-14 11:17:42 +0000
commit44a631e265c968594b101e324f74a6dbcb787f07 (patch)
tree9b0234cb9f5c744ef61e515b5793a1bd6621b35d /src/dns.cpp
parentMight as well make this message match, for completeness (diff)
Fix sometimes-leaking dns sockets when user quits between the two lookups (forward and reverse)
git-svn-id: http://svn.inspircd.org/repository/branches/1_0_stable@4382 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dns.cpp b/src/dns.cpp
index 0237de93e..b0e7e617f 100644
--- a/src/dns.cpp
+++ b/src/dns.cpp
@@ -698,6 +698,11 @@ void DNS::SetNS(const std::string &dnsserver)
DNS::~DNS()
{
+ if (this->myfd > -1)
+ {
+ log(DEBUG,"HA! An FD tried to sneak by unnoticed - freed it.");
+ dns_close(this->myfd);
+ }
}
bool DNS::ReverseLookup(const std::string &ip)