]> Sergey Matveev's repositories - public-inbox.git/commitdiff
http: graceful shutdown for pi-httpd.async callers
authorEric Wong <e@80x24.org>
Sat, 30 Apr 2016 02:57:39 +0000 (02:57 +0000)
committerEric Wong <e@80x24.org>
Sat, 30 Apr 2016 02:58:11 +0000 (02:58 +0000)
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

index 63985026e2912fbe9927cc68298fca47c7c6c394..bedb397d0f9cdbf7b143615613fb117510549ea4 100644 (file)
@@ -32,4 +32,7 @@ sub close {
        $self->SUPER::close(@_);
 }
 
+# do not let ourselves be closed during graceful termination
+sub busy () { $_[0]->{cb} }
+
 1;