summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-01 20:32:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-04-01 20:32:28 +0000
commit18507081624246eee804c01d8e2ddcaa14b0a411 (patch)
treefb51900c1c10c4d76263c3ef25c1831cb8f95d54 /src
parent2812ee83503c15cb168609d64e9d92dfb49d0ae1 (diff)
Don't fuck up the map by inserting 0
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9251 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/socketengines/socketengine_select.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socketengines/socketengine_select.cpp b/src/socketengines/socketengine_select.cpp
index 8ee381877..055637890 100644
--- a/src/socketengines/socketengine_select.cpp
+++ b/src/socketengines/socketengine_select.cpp
@@ -67,7 +67,6 @@ bool SelectEngine::DelFd(EventHandler* eh, bool force)
CurrentSetSize--;
ref[fd] = NULL;
- fds[fd] = 0;
ServerInstance->Logs->Log("SOCKET",DEBUG,"Remove file descriptor: %d", fd);
return true;
@@ -107,9 +106,12 @@ int SelectEngine::DispatchEvents()
FD_SET (a->second, &errfdset);
}
+
tval.tv_sec = 1;
tval.tv_usec = 0;
+
sresult = select(FD_SETSIZE, &rfdset, &wfdset, &errfdset, &tval);
+
if (sresult > 0)
{
for (std::map<int,int>::iterator a = fds.begin(); a != fds.end(); a++)