]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/HTTPD/Async.pm
httpd/async: avoid unnecessary on-stack delete
[public-inbox.git] / lib / PublicInbox / HTTPD / Async.pm
index 1de9501d18c43528e4ce634458b394d089d6eb41..7238650aff978605c53213fdd5586f32465f785b 100644 (file)
@@ -46,7 +46,7 @@ sub event_step {
        my ($self) = @_;
        if (my $cb = delete $self->{cb}) {
                # this may call async_pass when headers are done
-               $cb->(delete $self->{arg});
+               $cb->(my $refcnt_guard = delete $self->{arg});
        } elsif (my $sock = $self->{sock}) {
                my $http = $self->{http};
                # $self->{sock} is a read pipe for git-http-backend or cgit