Skip to content

Commit

Permalink
fix connect timeout for TLS handshakes (closes #1097)
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 21, 2017
1 parent 4718745 commit d69b981
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Changes
@@ -1,5 +1,7 @@

7.32 2017-05-18
7.32 2017-05-21
- Fixed memory leak in Mojo::IOLoop::Client that sometimes prevented the
connect timeout from working correctly for TLS handshakes.

7.31 2017-04-23
- Removed deprecated files, slurp and spurt functions from Mojo::Util.
Expand Down
1 change: 1 addition & 0 deletions lib/Mojo/IOLoop/Client.pm
Expand Up @@ -165,6 +165,7 @@ sub _try_tls {
$reactor->remove($handle);

# Start TLS handshake
weaken $self;
my $tls = Mojo::IOLoop::TLS->new($handle)->reactor($self->reactor);
$tls->on(upgrade => sub { $self->_cleanup->emit(connect => pop) });
$tls->on(error => sub { $self->emit(error => pop) });
Expand Down

0 comments on commit d69b981

Please sign in to comment.