http-server.c

Basic HTTP server and router in C
git clone git://git.finwo.net/lib/http-server.c
Log | Files | Refs | README

commit d31f50189ea4b8ea87a59e6567b666ad972fda4d
parent 3f0f44259aaa23c5600af2bfdb86b651111ae055
Author: Yersa Nordman <yersa@finwo.nl>
Date:   Sun,  6 Aug 2023 00:29:00 +0200

Fix listening check from fnet_listen

Diffstat:
Msrc/http-server.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/http-server.c b/src/http-server.c @@ -121,7 +121,7 @@ void http_server_main(const struct http_server_opts *opts) { ludata->cudata = opts->udata; ludata->evs = opts->evs; - if (fnet_listen(opts->addr, opts->port, &((struct fnet_options_t){ + if (!fnet_listen(opts->addr, opts->port, &((struct fnet_options_t){ .proto = FNET_PROTO_TCP, .flags = 0, .onListen = _hs_onServing,