summaryrefslogtreecommitdiff
path: root/src/dns.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns.cpp')
-rw-r--r--src/dns.cpp4
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)
{