about summary refs log tree commit homepage
path: root/lib/PublicInbox/Qspawn.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-01-06 10:10:53 +0000
committerEric Wong <e@80x24.org>2023-01-06 10:24:17 +0000
commitabd83a6fe86e1c907a3024ddc3eb566719449e51 (patch)
treef11daa7f18e71d03163220472794bdb9a2d7e026 /lib/PublicInbox/Qspawn.pm
parent5b92ed1384511d1a16813aabd7c902d93b87603b (diff)
downloadpublic-inbox-abd83a6fe86e1c907a3024ddc3eb566719449e51.tar.gz
Using the `next' operator doesn't work with `do {} (until|while)'
loops, so change it to use `until {}'.  I've never encountered
this problem in-the-wild, but I only use -(netd|httpd).
Diffstat (limited to 'lib/PublicInbox/Qspawn.pm')
-rw-r--r--lib/PublicInbox/Qspawn.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm
index 5d3ec309..f2beb4b2 100644
--- a/lib/PublicInbox/Qspawn.pm
+++ b/lib/PublicInbox/Qspawn.pm
@@ -201,7 +201,7 @@ sub rd_hdr ($) {
         my $total_rd = 0;
         my $hdr_buf = $self->{hdr_buf};
         my ($ph_cb, $ph_arg) = @{$self->{parse_hdr}};
-        do {
+        until (defined($ret)) {
                 my $r = sysread($self->{rpipe}, $$hdr_buf, 4096,
                                 length($$hdr_buf));
                 if (defined($r)) {
@@ -225,7 +225,7 @@ EOM
                         warn "error reading header: $!";
                         $ret = [ 500, [], [ "Internal error\n" ] ];
                 }
-        } until (defined $ret);
+        }
         delete $self->{parse_hdr}; # done parsing headers
         $ret;
 }