]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
repo_atom: switch to psgi_yield
authorEric Wong <e@80x24.org>
Wed, 25 Oct 2023 00:29:33 +0000 (00:29 +0000)
committerEric Wong <e@80x24.org>
Wed, 25 Oct 2023 07:28:37 +0000 (07:28 +0000)
To my pleasant surprise, it appears I've managed to make
psgi_yield a drop-in replacement for psgi_return...

lib/PublicInbox/RepoAtom.pm

index 79b76c12a780a9c6eb2f7f38231ffefba0af4dc5..b71795114e5fc6f54234a4e3a407f4ad2c2f7275 100644 (file)
@@ -100,7 +100,7 @@ sub srv_tags_atom {
        $ctx->{-feed_title} = "$ctx->{git}->{nick} tags";
        my $qsp = PublicInbox::Qspawn->new(\@cmd);
        $ctx->{-is_tag} = 1;
-       $qsp->psgi_return($ctx->{env}, undef, \&atom_ok, $ctx);
+       $qsp->psgi_yield($ctx->{env}, undef, \&atom_ok, $ctx);
 }
 
 sub srv_atom {
@@ -122,7 +122,7 @@ sub srv_atom {
        push @cmd, $path if $path ne '';
        my $qsp = PublicInbox::Qspawn->new(\@cmd, undef,
                                        { quiet => 1, 2 => $ctx->{lh} });
-       $qsp->psgi_return($ctx->{env}, undef, \&atom_ok, $ctx);
+       $qsp->psgi_yield($ctx->{env}, undef, \&atom_ok, $ctx);
 }
 
 1;