Skip to content

Commit 009eba7

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 dbcd24b commit 009eba7

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
@@ -24,6 +24,7 @@ sub close {
2424
return unless my $reactor = $self->reactor;
2525
return unless my $handle = delete $self->timeout(0)->{handle};
2626
$reactor->remove($handle);
27+
$handle->close;
2728
$self->emit('close');
2829
}
2930

0 commit comments

Comments
 (0)