Skip to content

Commit

Permalink
small optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 6, 2013
1 parent a0b612b commit 4b8a860
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/Mojo/IOLoop/Delay.pm
Expand Up @@ -26,9 +26,8 @@ sub wait {
$self->once(error => sub { shift->ioloop->stop; $err = shift });
$self->once(finish => sub { shift->ioloop->stop; @args = @_ });
$self->ioloop->start;
die $err if defined $err;

return wantarray ? @args : $args[0];
return defined $err ? die $err : wantarray ? @args : $args[0];
}

sub _step {
Expand Down

0 comments on commit 4b8a860

Please sign in to comment.