Skip to content

Commit 08feae9

Browse files
committed
Close handle when closing the stream
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.
1 parent 68075c9 commit 08feae9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Mojo/IOLoop/Stream.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ sub close {
2525
return unless my $handle = delete $self->timeout(0)->{handle};
2626
$reactor->remove($handle);
2727
$self->emit('close');
28+
$handle->close;
2829
}
2930

3031
sub close_gracefully { $_[0]->is_writing ? $_[0]{graceful}++ : $_[0]->close }

0 commit comments

Comments
 (0)