Skip to content

Commit

Permalink
fixed proxy exception handling bug in Mojo::UserAgent
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Aug 8, 2014
1 parent aa3b11d commit 5c958f2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changes
@@ -1,6 +1,7 @@

5.26 2014-08-08
- Improved WebSocket performance.
- Fixed proxy exception handling bug in Mojo::UserAgent.

5.25 2014-08-07
- Added reduce method to Mojo::Collection. (sri, batman)
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojo/IOLoop/Client.pm
Expand Up @@ -155,7 +155,7 @@ sub _try_tls {
SSL_ca_file => $args->{tls_ca}
&& -T $args->{tls_ca} ? $args->{tls_ca} : undef,
SSL_cert_file => $args->{tls_cert},
SSL_error_trap => sub { $self->_cleanup->emit(error => $_[1]) },
SSL_error_trap => sub { $self->emit(error => $_[1]) },
SSL_hostname => IO::Socket::SSL->can_client_sni ? $args->{address} : '',
SSL_key_file => $args->{tls_key},
SSL_startHandshake => 0,
Expand Down
3 changes: 1 addition & 2 deletions lib/Mojo/UserAgent.pm
Expand Up @@ -153,11 +153,10 @@ sub _connect_proxy {
# TLS upgrade
my $loop = $self->_loop($nb);
my $handle = $loop->stream($id)->steal_handle;
my $c = delete $self->{connections}{$id};
$loop->remove($id);
$id = $self->_connect($nb, 0, $old, $handle,
sub { shift->_start($nb, $old->connection($id), $cb) });
$self->{connections}{$id} = $c;
$self->{connections}{$id} = {cb => $cb, nb => $nb, tx => $old};
}
);
}
Expand Down

0 comments on commit 5c958f2

Please sign in to comment.