diff options
author | default <nobody@localhost> | 2024-06-20 17:38:02 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2024-06-20 17:38:02 +0200 |
commit | 428e57352527e33b141e976b45e290ac65fd68fc (patch) | |
tree | 37e8e8c6c334592ff170f68df03726cefde52215 /httpd.c | |
parent | 866f6f79ad2ab48c7319b75c37f1bf0674fe72b2 (diff) |
Minor tweak.
Diffstat (limited to 'httpd.c')
-rw-r--r-- | httpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -847,9 +847,10 @@ void httpd(void) if (setjmp(on_break) == 0) { for (;;) { - FILE *f = xs_socket_accept(rs); + int cs = xs_socket_accept(rs); - if (f != NULL) { + if (cs != -1) { + FILE *f = fdopen(cs, "r+"); xs *job = xs_data_new(&f, sizeof(FILE *)); job_post(job, 1); } |