diff options
author | June McEnroe <june@causal.agency> | 2020-07-11 15:26:29 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-07-11 15:26:29 -0400 |
commit | a947e617b4c0200d72db3f7e15727c9c027b0718 (patch) | |
tree | c4887a4dab256929ca354a522e68eb17ff67024a | |
parent | Remove -f option (diff) | |
download | scooper-a947e617b4c0200d72db3f7e15727c9c027b0718.tar.gz scooper-a947e617b4c0200d72db3f7e15727c9c027b0718.zip |
Handle KCGI_EXIT and call khttp_fcgi_free
Diffstat (limited to '')
-rw-r--r-- | server.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server.c b/server.c index e3261be..61e23bc 100644 --- a/server.c +++ b/server.c @@ -130,7 +130,10 @@ int main(int argc, char *argv[]) { error = request(&req); if (error && error != KCGI_HUP) break; } - errx(EX_PROTOCOL, "khttp_fcgi_parse: %s", kcgi_strerror(error)); + if (error != KCGI_EXIT) { + errx(EX_PROTOCOL, "khttp_fcgi_parse: %s", kcgi_strerror(error)); + } + khttp_fcgi_free(fcgi); } else { struct kreq req; enum kcgi_err error = khttp_parse( |