From: Santiago Piccinini Date: Thu, 10 Oct 2019 20:26:48 +0000 (-0300) Subject: proc: do not cancel script killing after writing headers X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=939c281c70ef82929ffcb3cb383fd6fdc40f341b;p=oweals%2Fuhttpd.git proc: do not cancel script killing after writing headers Before this change if the cgi script hangs after writing headers then the process will never be killed. Let's only cancel the timeout if the process ends. Signed-off-by: Santiago Piccinini Signed-off-by: Daniel Golle --- diff --git a/proc.c b/proc.c index 1d63d86..2b69703 100644 --- a/proc.c +++ b/proc.c @@ -225,11 +225,9 @@ static void proc_handle_header(struct relay *r, const char *name, const char *va static void proc_handle_header_end(struct relay *r) { struct client *cl = r->cl; - struct dispatch_proc *p = &cl->dispatch.proc; struct blob_attr *cur; int rem; - uloop_timeout_cancel(&p->timeout); uh_http_header(cl, cl->dispatch.proc.status_code, cl->dispatch.proc.status_msg); blob_for_each_attr(cur, cl->dispatch.proc.hdr.head, rem) ustream_printf(cl->us, "%s: %s\r\n", blobmsg_name(cur),