Skip to content

Commit

Permalink
prevent a few random warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Jul 26, 2014
1 parent 5cd1890 commit a5e62ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Mojo/UserAgent.pm
Expand Up @@ -239,7 +239,7 @@ sub _finish {
my ($self, $id, $close) = @_;

# Remove request timeout
my $c = $self->{connections}{$id};
return unless my $c = $self->{connections}{$id};
return unless my $loop = $self->_loop($c->{nb});
$loop->remove($c->{timeout}) if $c->{timeout};

Expand Down
5 changes: 1 addition & 4 deletions lib/Mojo/UserAgent/Transactor.pm
Expand Up @@ -39,10 +39,7 @@ sub endpoint {
return $proto, $host, $port;
}

sub peer {
my ($self, $tx) = @_;
return $self->_proxy($tx, $self->endpoint($tx));
}
sub peer { $_[0]->_proxy($_[1], $_[0]->endpoint($_[1])) }

sub proxy_connect {
my ($self, $old) = @_;
Expand Down

0 comments on commit a5e62ba

Please sign in to comment.