From: Eric Wong Date: Sat, 30 Apr 2016 02:57:39 +0000 (+0000) Subject: http: graceful shutdown for pi-httpd.async callers X-Git-Tag: v1.0.0~572 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f30a78b3b8f00298c5be2aa724a7358ff892efda;p=public-inbox.git http: graceful shutdown for pi-httpd.async callers git clones may take a long time and it's wrong to drop connections in the middle of a transaction. --- diff --git a/lib/PublicInbox/HTTPD/Async.pm b/lib/PublicInbox/HTTPD/Async.pm index 63985026..bedb397d 100644 --- a/lib/PublicInbox/HTTPD/Async.pm +++ b/lib/PublicInbox/HTTPD/Async.pm @@ -32,4 +32,7 @@ sub close { $self->SUPER::close(@_); } +# do not let ourselves be closed during graceful termination +sub busy () { $_[0]->{cb} } + 1;