diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-06 21:03:59 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2025-10-06 21:03:59 +0200 |
| commit | db9cb051c4ee05c07ab32dfed5bae8b7dc0916bd (patch) | |
| tree | 44e1efae86af612923ec5486c00eb2c56019c865 /handler.c | |
| parent | 4918cf87d3cf5d3dd8425fe10d97a06282472df6 (diff) | |
Allow custom backlog connections
libweb calls listen(2) when setting up the HTTP server, and its backlog
argument was hardcoded to 10. While probably not an issue for some
applications, it can be too limiting for some others.
Therefore, it is desirable to allow library users to set up their own
limits. Otherwise, 10 is still chosen as a sane default.
Diffstat (limited to 'handler.c')
| -rw-r--r-- | handler.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -220,7 +220,7 @@ int handler_notify_close(struct handler *const h) int handler_listen(struct handler *const h, const unsigned short port, unsigned short *const outport) { - if (!(h->server = server_init(port, outport))) + if (!(h->server = server_init(port, outport, h->cfg.backlog))) { fprintf(stderr, "%s: server_init failed\n", __func__); return -1; |
