forked from aniani/gmnisrv
Break after processing polled client
Otherwise we might not grok it, ya jive
This commit is contained in:
parent
7fed84898b
commit
a9ee61418f
@ -443,10 +443,13 @@ server_run(struct gmnisrv_server *server)
|
|||||||
for (size_t i = 0; i < server->nclients; ++i) {
|
for (size_t i = 0; i < server->nclients; ++i) {
|
||||||
if ((server->fds[server->nlisten + i].revents & (POLLHUP | POLLERR))) {
|
if ((server->fds[server->nlisten + i].revents & (POLLHUP | POLLERR))) {
|
||||||
disconnect_client(server, &server->clients[i]);
|
disconnect_client(server, &server->clients[i]);
|
||||||
|
break;
|
||||||
} else if ((server->fds[server->nlisten + i].revents & POLLIN)) {
|
} else if ((server->fds[server->nlisten + i].revents & POLLIN)) {
|
||||||
client_readable(server, &server->clients[i]);
|
client_readable(server, &server->clients[i]);
|
||||||
|
break;
|
||||||
} else if ((server->fds[server->nlisten + i].revents & POLLOUT)) {
|
} else if ((server->fds[server->nlisten + i].revents & POLLOUT)) {
|
||||||
client_writable(server, &server->clients[i]);
|
client_writable(server, &server->clients[i]);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (server->run);
|
} while (server->run);
|
||||||
|
Loading…
Reference in New Issue
Block a user