mirror of
https://github.com/anope/anope.git
synced 2026-06-29 01:46:38 +02:00
Added kqueue
This commit is contained in:
@@ -142,13 +142,13 @@ void SocketEngine::Process()
|
||||
continue;
|
||||
Socket *s = it->second;
|
||||
|
||||
if (s->HasFlag(SF_DEAD))
|
||||
continue;
|
||||
|
||||
if (ev->revents & (POLLERR | POLLRDHUP))
|
||||
{
|
||||
socklen_t sz = sizeof(errno);
|
||||
getsockopt(s->GetFD(), SOL_SOCKET, SO_ERROR, &errno, &sz);
|
||||
s->ProcessError();
|
||||
s->SetFlag(SF_DEAD);
|
||||
delete s;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -160,15 +160,6 @@ void SocketEngine::Process()
|
||||
|
||||
if ((ev->revents & POLLOUT) && !s->ProcessWrite())
|
||||
s->SetFlag(SF_DEAD);
|
||||
}
|
||||
|
||||
for (int i = 0; i < SocketCount; ++i)
|
||||
{
|
||||
pollfd *ev = &events[i];
|
||||
std::map<int, Socket *>::iterator it = Sockets.find(ev->fd);
|
||||
if (it == Sockets.end())
|
||||
continue;
|
||||
Socket *s = it->second;
|
||||
|
||||
if (s->HasFlag(SF_DEAD))
|
||||
delete s;
|
||||
|
||||
Reference in New Issue
Block a user