mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-15 21:49:02 -04:00
We can't log in SocketEngine::DelFd(), because the fd we're removing might just be that of the logger!
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6082 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
72da54c1c2
commit
e473ba1a25
@ -93,8 +93,6 @@ void EPollEngine::WantWrite(EventHandler* eh)
|
|||||||
|
|
||||||
bool EPollEngine::DelFd(EventHandler* eh)
|
bool EPollEngine::DelFd(EventHandler* eh)
|
||||||
{
|
{
|
||||||
ServerInstance->Log(DEBUG,"EPollEngine::DelFd(%d)",eh->GetFd());
|
|
||||||
|
|
||||||
int fd = eh->GetFd();
|
int fd = eh->GetFd();
|
||||||
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
|
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
|
||||||
return false;
|
return false;
|
||||||
@ -106,10 +104,7 @@ bool EPollEngine::DelFd(EventHandler* eh)
|
|||||||
int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev);
|
int i = epoll_ctl(EngineHandle, EPOLL_CTL_DEL, fd, &ev);
|
||||||
|
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
{
|
|
||||||
ServerInstance->Log(DEBUG,"epoll: List deletion failure: %s",strerror(errno));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
CurrentSetSize--;
|
CurrentSetSize--;
|
||||||
ref[fd] = NULL;
|
ref[fd] = NULL;
|
||||||
|
@ -84,8 +84,6 @@ bool KQueueEngine::DelFd(EventHandler* eh)
|
|||||||
{
|
{
|
||||||
int fd = eh->GetFd();
|
int fd = eh->GetFd();
|
||||||
|
|
||||||
ServerInstance->Log(DEBUG,"KQueueEngine::DelFd(%d)",fd);
|
|
||||||
|
|
||||||
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
|
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -64,17 +64,12 @@ bool SelectEngine::DelFd(EventHandler* eh)
|
|||||||
{
|
{
|
||||||
int fd = eh->GetFd();
|
int fd = eh->GetFd();
|
||||||
|
|
||||||
ServerInstance->Log(DEBUG,"SelectEngine::DelFd(%d)",fd);
|
|
||||||
|
|
||||||
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
|
if ((fd < 0) || (fd > MAX_DESCRIPTORS))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
std::map<int,int>::iterator t = fds.find(fd);
|
std::map<int,int>::iterator t = fds.find(fd);
|
||||||
if (t != fds.end())
|
if (t != fds.end())
|
||||||
{
|
|
||||||
fds.erase(t);
|
fds.erase(t);
|
||||||
ServerInstance->Log(DEBUG,"Deleted fd %d",fd);
|
|
||||||
}
|
|
||||||
|
|
||||||
CurrentSetSize--;
|
CurrentSetSize--;
|
||||||
ref[fd] = NULL;
|
ref[fd] = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user