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-07-20 23:52:53 +0200 |
| commit | 2e8485d687dd5f673b8d2aadb0816571d3f32cb7 (patch) | |
| tree | 6319effdcacf839e8f2a899565cf6460b32c08ec /handler.c | |
| parent | 82fffd1acebf688f1c082d7a597d68239e8a39cc (diff) | |
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; } |
