Navigation Menu

Skip to content

Commit

Permalink
fixed small leak in Mojo::IOLoop::Server
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 9, 2014
1 parent 21bbb91 commit f28eb63
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/Mojo/IOLoop/Server.pm
Expand Up @@ -128,12 +128,17 @@ sub _accept {

# Start TLS handshake
$self->emit_safe(accept => $handle) and next unless my $tls = $self->{tls};
next unless $handle = IO::Socket::SSL->start_SSL($handle, %$tls);
$self->reactor->io($handle => sub { $self->_tls($handle) });
$self->{handles}{$handle} = $handle;
$self->_handshake($self->{handles}{$handle} = $handle)
if $handle = IO::Socket::SSL->start_SSL($handle, %$tls);
}
}

sub _handshake {
my ($self, $handle) = @_;
weaken $self;
$self->reactor->io($handle => sub { $self->_tls($handle) });
}

sub _tls {
my ($self, $handle) = @_;

Expand Down

0 comments on commit f28eb63

Please sign in to comment.