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).
---
 lib/PublicInbox/Qspawn.pm | 4 ++--
 1 file 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;
 }

Reply via email to