summaryrefslogtreecommitdiff
path: root/src/socketengine_iocp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/socketengine_iocp.cpp')
-rw-r--r--src/socketengine_iocp.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp
index d66ca2ac4..96ff9eb31 100644
--- a/src/socketengine_iocp.cpp
+++ b/src/socketengine_iocp.cpp
@@ -74,10 +74,6 @@ bool IOCPEngine::AddFd(EventHandler* eh)
if (!CreateIoCompletionPort((HANDLE)eh->GetFd(), m_completionPort, completion_key, 0))
return false;
- /* set up binding, increase set size */
- ref[*fake_fd] = eh;
- ++CurrentSetSize;
-
/* setup initial events */
if(is_accept)
PostAcceptEvent(eh);
@@ -101,6 +97,10 @@ bool IOCPEngine::AddFd(EventHandler* eh)
/* Ohshi-, map::insert failed :/ */
return false;
}
+
+ ++CurrentSetSize;
+ ref[*fake_fd] = eh;
+
return true;
}