Skip to content

Commit

Permalink
no need for two lines
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Dec 17, 2014
1 parent 6160782 commit 966cdf0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/IOLoop/Stream.pm
Expand Up @@ -99,8 +99,7 @@ sub _read {
my $self = shift;

if (defined(my $read = $self->{handle}->sysread(my $buffer, 131072, 0))) {
return $self->close if $read == 0;
return $self->emit(read => $buffer)->_again;
return $read == 0 ? $self->close : $self->emit(read => $buffer)->_again;
}

# Retry
Expand Down

0 comments on commit 966cdf0

Please sign in to comment.