When we get events on unknown file descriptors, unregister them rather than spinning at 100% CPU

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12436 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
danieldg 2010-02-11 20:27:03 +00:00
parent 7f0a9608c8
commit 2abcc65d69

View File

@ -195,7 +195,11 @@ int EPollEngine::DispatchEvents()
{
EventHandler* eh = ref[events[j].data.fd];
if (!eh)
{
ServerInstance->Logs->Log("SOCKET",DEBUG,"Got event on unknown fd: %d", events[j].data.fd);
epoll_ctl(EngineHandle, EPOLL_CTL_DEL, events[j].data.fd, &events[j]);
continue;
}
if (events[j].events & EPOLLHUP)
{
ErrorEvents++;