Skip to content

Commit

Permalink
another one-liner
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 22, 2015
1 parent 0294962 commit afbfefe
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/Mojo/IOLoop/Stream.pm
Expand Up @@ -18,11 +18,7 @@ sub close {
$self->emit('close');
}

sub close_gracefully {
my $self = shift;
return $self->{graceful} = 1 if $self->is_writing;
$self->close;
}
sub close_gracefully { $_[0]->is_writing ? $_[0]{graceful}++ : $_[0]->close }

sub handle { shift->{handle} }

Expand Down

0 comments on commit afbfefe

Please sign in to comment.