]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/PktOp.pm
pkt_op: do not exit subroutine via "next"
[public-inbox.git] / lib / PublicInbox / PktOp.pm
index 10d76da0536b18064fcbf4874698f5e76da9ea7e..5d8e78ea78635211885271cb650f1ed48d76696e 100644 (file)
@@ -48,7 +48,7 @@ sub event_step {
        my ($self) = @_;
        my $c = $self->{sock};
        my $msg;
-       do {
+       while (1) {
                my $n = recv($c, $msg, 4096, 0);
                unless (defined $n) {
                        return if $! == EAGAIN;
@@ -70,7 +70,7 @@ sub event_step {
                my ($sub, @args) = @$op;
                $sub->(@args, @pargs);
                return $self->close if $msg eq ''; # close on EOF
-       } while (1);
+       }
 }
 
 1;