summaryrefslogtreecommitdiff
path: root/src/socketengine_select.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengine_select.cpp')
-rw-r--r--src/socketengine_select.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/socketengine_select.cpp b/src/socketengine_select.cpp
index a369cc95a..7ba386812 100644
--- a/src/socketengine_select.cpp
+++ b/src/socketengine_select.cpp
@@ -37,7 +37,7 @@ bool SelectEngine::AddFd(EventHandler* eh)
return false;
if (ref[fd])
- DelFd(ref[fd]);
+ return false;
fds[fd] = fd;
ref[fd] = eh;
@@ -65,6 +65,7 @@ bool SelectEngine::DelFd(EventHandler* eh, bool force)
CurrentSetSize--;
ref[fd] = NULL;
+ fds[fd] = 0;
ServerInstance->Log(DEBUG,"Remove file descriptor: %d", fd);
return true;