From 18507081624246eee804c01d8e2ddcaa14b0a411 Mon Sep 17 00:00:00 2001 From: w00t Date: Tue, 1 Apr 2008 20:32:28 +0000 Subject: 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 --- src/socketengines/socketengine_select.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/socketengines/socketengine_select.cpp') 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::iterator a = fds.begin(); a != fds.end(); a++) -- cgit v1.2.3