diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-04-28 00:19:32 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-05-01 04:13:16 +0200 |
| commit | dc063b90cbf13a463c29ee5b81abeb07b6698473 (patch) | |
| tree | 83a2fbeb983c695eb6030e47f7fb3f6904edb8b4 /handler.c | |
| parent | fa997aa2c153cef50941b4d4036694485259ac2a (diff) | |
| download | slcl-dc063b90cbf13a463c29ee5b81abeb07b6698473.tar.gz | |
Replace select(2) with poll(2)
select(2) has a number of well-known issues (e.g.: FD_SETSIZE limiting
the maximum amount of file descriptors to watch) that are mostly solved
by poll(2) and thus can be used as a drop-in replacement.
Diffstat (limited to 'handler.c')
| -rw-r--r-- | handler.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -233,7 +233,7 @@ int handler_listen(struct handler *const h, const short port) for (;;) { bool exit, io; - struct server_client *const c = server_select(h->server, &io, &exit); + struct server_client *const c = server_poll(h->server, &io, &exit); if (exit) { @@ -242,7 +242,7 @@ int handler_listen(struct handler *const h, const short port) } else if (!c) { - fprintf(stderr, "%s: server_select failed\n", __func__); + fprintf(stderr, "%s: server_poll failed\n", __func__); return -1; } |
