From a947e617b4c0200d72db3f7e15727c9c027b0718 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Sat, 11 Jul 2020 15:26:29 -0400 Subject: Handle KCGI_EXIT and call khttp_fcgi_free --- server.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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( -- cgit 1.4.1