]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/HTTP.pm
tls: epollbit: account for miscellaneous OpenSSL errors
[public-inbox.git] / lib / PublicInbox / HTTP.pm
index 5844ef440f1e8dd324ce6b67401de7c99e696c8e..88020ae82438375e42a0854b6c6ae2c4defe2c89 100644 (file)
@@ -70,7 +70,7 @@ sub new ($$$) {
        my $wbuf;
        if ($sock->can('accept_SSL') && !$sock->accept_SSL) {
                return CORE::close($sock) if $! != EAGAIN;
-               $ev = PublicInbox::TLS::epollbit();
+               $ev = PublicInbox::TLS::epollbit() or return CORE::close($sock);
                $wbuf = [ \&PublicInbox::DS::accept_tls_step ];
        }
        $self->{wbuf} = $wbuf if $wbuf;