diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-16 13:52:10 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-16 13:52:10 +0000 |
commit | d7875763890e79ddcc1f4f105d7b896b0d5e5d83 (patch) | |
tree | 0c6cab5e7d7918731a0e43b983c486bd3ed16807 /src/dns.cpp | |
parent | 5d18f26b6bfb7a575b50dc2e3ad909131b9f75da (diff) |
Fix socket leak properly this time
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4405 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/dns.cpp')
-rw-r--r-- | src/dns.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dns.cpp b/src/dns.cpp index e8b15c9bf..f2acf05a6 100644 --- a/src/dns.cpp +++ b/src/dns.cpp @@ -172,7 +172,6 @@ void dns_close(int fd) if (fd == lastcreate) { wantclose = 1; - return; } shutdown(fd,2); close(fd); @@ -800,6 +799,7 @@ std::string DNS::GetResult() if (ServerInstance && ServerInstance->stats) ServerInstance->stats->statsDnsGood++; dns_close(this->myfd); + this->myfd = -1; return result; } else @@ -809,6 +809,7 @@ std::string DNS::GetResult() if (this->myfd != -1) { dns_close(this->myfd); + this->myfd = -1; } return ""; } @@ -822,6 +823,7 @@ std::string DNS::GetResultIP() if (this->myfd != -1) { dns_close(this->myfd); + this->myfd = -1; } if (result) { |