]> Sergey Matveev's repositories - public-inbox.git/commit
ds|nntp: use CORE::close on socket
authorEric Wong <e@80x24.org>
Mon, 24 Jun 2019 02:52:41 +0000 (02:52 +0000)
committerEric Wong <e@80x24.org>
Mon, 24 Jun 2019 05:26:27 +0000 (05:26 +0000)
commitb3e4b3b3c67b9df7868518978e721417b0aa7c9c
treebe6fe79456d577444fee29d3693e4e65f17c022b
parentdb4169098e955380c47689d26deeb75e6952eff3
ds|nntp: use CORE::close on socket

IO::Socket::SSL will try to re-bless back to the original class
on TLS negotiation failure.  Unfortunately, the original class
is 'GLOB', and re-blessing to 'GLOB' takes away all the IO::Handle
methods, because Filehandle/IO are a special case in Perl5.
Anyways, since we already use syswrite() and sysread() as functions
on our socket, we might as well use CORE::close(), as well (and
it plays nicely with tied classes).
lib/PublicInbox/DS.pm
lib/PublicInbox/NNTP.pm
t/nntpd-tls.t