]> Sergey Matveev's repositories - public-inbox.git/commitdiff
ds: remove steal_socket method
authorEric Wong <e@80x24.org>
Mon, 10 Jun 2019 02:18:44 +0000 (02:18 +0000)
committerEric Wong <e@80x24.org>
Mon, 10 Jun 2019 05:05:15 +0000 (05:05 +0000)
We won't be needing it, not even for TLS support.

lib/PublicInbox/DS.pm

index 7d7baac7da1740ab6c0cac485323dcdbb3b720b3..5177d1f18a9ea35181494b9d0d901bec7e216ebc 100644 (file)
@@ -487,26 +487,6 @@ retry:
 ### I N S T A N C E   M E T H O D S
 #####################################################################
 
-=head2 C<< $obj->steal_socket() >>
-
-Basically returns our socket and makes it so that we don't try to close it,
-but we do remove it from epoll handlers.  THIS CLOSES $self.  It is the same
-thing as calling close, except it gives you the socket to use.
-
-=cut
-sub steal_socket {
-    my PublicInbox::DS $self = $_[0];
-    return if $self->{closed};
-
-    # cleanup does most of the work of closing this socket
-    $self->_cleanup();
-
-    # now undef our internal sock and fd structures so we don't use them
-    my $sock = $self->{sock};
-    $self->{sock} = undef;
-    return $sock;
-}
-
 =head2 C<< $obj->close >>
 
 Close the socket.