mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-15 01:55:03 +00:00
Close everything if xs_socket_accept() returns NULL.
This commit is contained in:
parent
3283536cfa
commit
295507fd9e
1 changed files with 6 additions and 3 deletions
5
httpd.c
5
httpd.c
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue