summaryrefslogtreecommitdiff
path: root/src/socketengine_iocp.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 19:24:09 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-10-21 19:24:09 +0000
commit0c04ea89dbb1516423535b2f5fdadbdab9fe8e58 (patch)
tree7d599b208f24869822cc1c619a3de755852e0e34 /src/socketengine_iocp.cpp
parent32bffd861fd1c8b723ae63f4ea66720fd47e7d0a (diff)
Set these back to sane operation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8271 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/socketengine_iocp.cpp')
-rw-r--r--src/socketengine_iocp.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/socketengine_iocp.cpp b/src/socketengine_iocp.cpp
index d780b9043..66ae7f8ba 100644
--- a/src/socketengine_iocp.cpp
+++ b/src/socketengine_iocp.cpp
@@ -54,11 +54,17 @@ bool IOCPEngine::AddFd(EventHandler* eh)
/* In range? */
if ((*fake_fd < 0) || (*fake_fd > MAX_DESCRIPTORS))
+ {
+ delete fake_fd;
return false;
+ }
/* Already an entry here */
if (ref[*fake_fd])
- DelFd(ref[fd]);
+ {
+ delete fake_fd;
+ return false;
+ }
/* are we a listen socket? */
getsockopt(eh->GetFd(), SOL_SOCKET, SO_ACCEPTCONN, (char*)&is_accept, &opt_len);