diff options
author | Eric Wong <e@80x24.org> | 2020-10-30 02:13:58 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-10-30 16:38:21 +0000 |
commit | c51c22c349529d9c377160abcc7961a6ca7b7d5c (patch) | |
tree | 99df405068988cdbd292bc9ac2dfdd6ec9737b7c /lib/PublicInbox/TLS.pm | |
parent | 632d2c84efe004710bdf58048e348383a1644fea (diff) | |
download | public-inbox-c51c22c349529d9c377160abcc7961a6ca7b7d5c.tar.gz |
Apparently they happen (triggered by my -imapd instance), so bail out by closing the underlying socket rather than stopping the event loop and daemon process.
Diffstat (limited to 'lib/PublicInbox/TLS.pm')
-rw-r--r-- | lib/PublicInbox/TLS.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/PublicInbox/TLS.pm b/lib/PublicInbox/TLS.pm index 0f838e25..86e6331d 100644 --- a/lib/PublicInbox/TLS.pm +++ b/lib/PublicInbox/TLS.pm @@ -6,6 +6,7 @@ package PublicInbox::TLS; use strict; use IO::Socket::SSL; use PublicInbox::Syscall qw(EPOLLIN EPOLLOUT); +use Carp qw(carp); sub err () { $SSL_ERROR } @@ -13,7 +14,8 @@ sub err () { $SSL_ERROR } sub epollbit () { return EPOLLIN if $SSL_ERROR == SSL_WANT_READ; return EPOLLOUT if $SSL_ERROR == SSL_WANT_WRITE; - die "unexpected SSL error: $SSL_ERROR"; + carp "unexpected SSL error: $SSL_ERROR"; + undef; } 1; |