1
0
mirror of https://github.com/anope/anope.git synced 2026-06-28 01:16:37 +02:00

Fixed the epoll engine so it really works

This commit is contained in:
Adam
2010-08-01 22:43:48 -04:00
parent f887b37453
commit 5258549305
@@ -89,7 +89,7 @@ class SocketEngineEPoll : public SocketEngineBase
ev.events = EPOLLIN | EPOLLOUT;
ev.data.fd = s->GetSock();
if (epoll_ctl(EngineHandle, EPOLL_CTL_ADD, ev.data.fd, &ev) == -1)
if (epoll_ctl(EngineHandle, EPOLL_CTL_MOD, ev.data.fd, &ev) == -1)
Alog() << "Unable to mark fd " << ev.data.fd << " as writable in socketengine epoll: " << strerror(errno);
}
@@ -102,7 +102,7 @@ class SocketEngineEPoll : public SocketEngineBase
ev.events = EPOLLIN;
ev.data.fd = s->GetSock();
if (epoll_ctl(EngineHandle, EPOLL_CTL_ADD, ev.data.fd, &ev) == -1)
if (epoll_ctl(EngineHandle, EPOLL_CTL_MOD, ev.data.fd, &ev) == -1)
Alog() << "Unable to mark fd " << ev.data.fd << " as unwritable in socketengine epoll: " << strerror(errno);
}