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

Made socket engine stop processing once all sockets have been checked

This commit is contained in:
Adam
2010-12-27 00:41:04 -05:00
parent 87d0fc8bb5
commit fce491e18c
2 changed files with 9 additions and 2 deletions
@@ -137,9 +137,13 @@ class SocketEnginePoll : public SocketEngineBase
return;
}
for (int i = 0; i < total; ++i)
for (int i = 0, processed = 0; i < SocketCount && processed != total; ++i)
{
pollfd *ev = &this->events[i];
if (ev->revents != 0)
++processed;
Socket *s = Sockets[ev->fd];
if (s->HasFlag(SF_DEAD))