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
This commit is contained in:
w00t 2008-04-01 20:32:28 +00:00
parent 2812ee8350
commit 1850708162

View File

@ -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++)