Close everything if xs_socket_accept() returns NULL.

This commit is contained in:
default 2023-02-22 10:02:24 +01:00
parent 3283536cfa
commit 295507fd9e

View file

@ -478,10 +478,13 @@ void httpd(void)
for (;;) { for (;;) {
FILE *f = xs_socket_accept(rs); FILE *f = xs_socket_accept(rs);
if (f != NULL) {
xs *job = xs_data_new(&f, sizeof(FILE *)); xs *job = xs_data_new(&f, sizeof(FILE *));
job_post(job); job_post(job);
} }
else
break;
}
} }
srv_running = 0; srv_running = 0;