1
0
mirror of https://git.sr.ht/~sircmpwn/gmnisrv synced 2024-12-04 14:46:42 -05:00

Break after processing polled client

Otherwise we might not grok it, ya jive
This commit is contained in:
Drew DeVault 2020-09-27 12:11:11 -04:00
parent 7fed84898b
commit a9ee61418f

View File

@ -443,10 +443,13 @@ server_run(struct gmnisrv_server *server)
for (size_t i = 0; i < server->nclients; ++i) {
if ((server->fds[server->nlisten + i].revents & (POLLHUP | POLLERR))) {
disconnect_client(server, &server->clients[i]);
break;
} else if ((server->fds[server->nlisten + i].revents & POLLIN)) {
client_readable(server, &server->clients[i]);
break;
} else if ((server->fds[server->nlisten + i].revents & POLLOUT)) {
client_writable(server, &server->clients[i]);
break;
}
}
} while (server->run);