mirror of
https://git.sr.ht/~sircmpwn/gmnisrv
synced 2024-11-03 06:07:17 -05:00
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) {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user