From bfa40d0c4a970e5af0eae0441920a491c4f6fa1d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 25 Dec 2019 07:50:36 +0000 Subject: httpd/async: support passing arg to callbacks Another step towards removing anonymous subs to eliminate a possible source of memory leaks and high memory use. --- lib/PublicInbox/Qspawn.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Qspawn.pm') diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm index 651fa390..c2856609 100644 --- a/lib/PublicInbox/Qspawn.pm +++ b/lib/PublicInbox/Qspawn.pm @@ -185,7 +185,7 @@ reread: ($rpipe) = @_; # popen_rd result if ($async) { # PublicInbox::HTTPD::Async->new($rpipe, $cb, $end) - $async = $async->($rpipe, $cb, $end); + $async = $async->($rpipe, $cb, undef, $end); # $cb will call ->async_pass or ->close } else { # generic PSGI $cb->() while $qx; @@ -297,7 +297,7 @@ sub psgi_return { ($rpipe) = @_; if ($async) { # PublicInbox::HTTPD::Async->new($rpipe, $cb, $end) - $async = $async->($rpipe, $cb, $end); + $async = $async->($rpipe, $cb, undef, $end); # $cb will call ->async_pass or ->close } else { # generic PSGI $cb->() while $rd_hdr; -- cgit v1.2.3-24-ge0c7