mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-25 16:53:37 +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
9
httpd.c
9
httpd.c
|
@ -478,9 +478,12 @@ void httpd(void)
|
|||
for (;;) {
|
||||
FILE *f = xs_socket_accept(rs);
|
||||
|
||||
xs *job = xs_data_new(&f, sizeof(FILE *));
|
||||
|
||||
job_post(job);
|
||||
if (f != NULL) {
|
||||
xs *job = xs_data_new(&f, sizeof(FILE *));
|
||||
job_post(job);
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue