Skip to content

Commit

Permalink
Close handle when closing the stream
Browse files Browse the repository at this point in the history
At the end of the connection, each side sends a close_notify alert to
inform the peer that the connection is closed. IO::Socket::SSL does
that, if its close method is called.
  • Loading branch information
kensanata committed Nov 8, 2021
1 parent dbcd24b commit 009eba7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/Mojo/IOLoop/Stream.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ sub close {
return unless my $reactor = $self->reactor;
return unless my $handle = delete $self->timeout(0)->{handle};
$reactor->remove($handle);
$handle->close;
$self->emit('close');
}

Expand Down

0 comments on commit 009eba7

Please sign in to comment.