From f30a78b3b8f00298c5be2aa724a7358ff892efda Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 30 Apr 2016 02:57:39 +0000 Subject: 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. --- lib/PublicInbox/HTTPD/Async.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') 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; -- cgit v1.2.3-24-ge0c7