commit e435f73ea4581d916be5df164536acc441bd77db
parent aca1539bb54832b5a9f9f6fbd823f60366a6594a
Author: Yersa Nordman <yersa@finwo.nl>
Date: Thu, 16 Nov 2023 22:45:19 +0100
Do call fnet_main from the same fn, needs to be the same thread anyways
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/http-server.c b/src/http-server.c
@@ -149,6 +149,7 @@ void _hs_onListenClose(struct fnet_ev *ev) {
}
void http_server_main(struct http_server_opts *opts) {
+ int ret;
if (!opts) exit(1);
opts->shutdown = false;
@@ -179,6 +180,8 @@ void http_server_main(struct http_server_opts *opts) {
// This is a forever function, controlled by network thread
while(!opts->shutdown) {
+ ret = fnet_main();
+ if (ret) exit(ret);
sleep_ms(100);
}
}