summaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-02-09 17:17:04 +0100
committerAttila Molnar <attilamolnar@hush.com>2014-02-09 17:17:04 +0100
commit4ec65c6231df9fcb38210f9b885cdf73b72cc176 (patch)
tree97bb3a6c46634b2b00c3edaacdb86867a5023423 /src/commands
parent080bb7c0b3d4cc3fcd06d04621ae4780ebbf3f2c (diff)
Call DelFd() and SetFd(-1) from SocketEngine::Close(EventHandler*)
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/cmd_dns.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/commands/cmd_dns.cpp b/src/commands/cmd_dns.cpp
index 63924d87b..7b93c7bb3 100644
--- a/src/commands/cmd_dns.cpp
+++ b/src/commands/cmd_dns.cpp
@@ -681,10 +681,8 @@ class MyManager : public Manager, public Timer, public EventHandler
{
if (this->GetFd() > -1)
{
- SocketEngine::DelFd(this);
SocketEngine::Shutdown(this, 2);
SocketEngine::Close(this);
- this->SetFd(-1);
/* Remove expired entries from the cache */
this->Tick(ServerInstance->Time());
@@ -710,13 +708,13 @@ class MyManager : public Manager, public Timer, public EventHandler
{
/* Failed to bind */
ServerInstance->Logs->Log("RESOLVER", LOG_SPARSE, "Resolver: Error binding dns socket - hostnames will NOT resolve");
- SocketEngine::Close(this);
+ SocketEngine::Close(this->GetFd());
this->SetFd(-1);
}
else if (!SocketEngine::AddFd(this, FD_WANT_POLL_READ | FD_WANT_NO_WRITE))
{
ServerInstance->Logs->Log("RESOLVER", LOG_SPARSE, "Resolver: Internal error starting DNS - hostnames will NOT resolve.");
- SocketEngine::Close(this);
+ SocketEngine::Close(this->GetFd());
this->SetFd(-1);
}
}