about summary refs log tree commit homepage
path: root/lib/PublicInbox/NetNNTPSocks.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2023-11-09 10:09:40 +0000
committerEric Wong <e@80x24.org>2023-11-09 21:53:51 +0000
commitf38ad2354d05467191f710c1de656157600af73e (patch)
tree3d0cbced8d4aaf6d86a5e24547e3f17f4a0e40f3 /lib/PublicInbox/NetNNTPSocks.pm
parentb7c01eafca786e1a36b75cb8ec682a6d008a0a36 (diff)
downloadpublic-inbox-f38ad2354d05467191f710c1de656157600af73e.tar.gz
This should allow us to detect shutdown signals in -watch
more quickly and not unnecessarily fail on inconsequential
signals such as SIGWINCH.
Diffstat (limited to 'lib/PublicInbox/NetNNTPSocks.pm')
-rw-r--r--lib/PublicInbox/NetNNTPSocks.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/NetNNTPSocks.pm b/lib/PublicInbox/NetNNTPSocks.pm
index 306dcacb..d27efba1 100644
--- a/lib/PublicInbox/NetNNTPSocks.pm
+++ b/lib/PublicInbox/NetNNTPSocks.pm
@@ -19,6 +19,7 @@ sub new_socks {
         } qw(ProxyAddr ProxyPort SocksVersion SocksDebug SocksResolve);
         no warnings 'uninitialized'; # needed for $SOCKS_ERROR
         my $ret = Net::NNTP->new(%opt); # calls PublicInbox::NetNNTPSocks::new
+        return $ret if $ret || $!{EINTR};
         $ret // die "errors: \$!=$! SOCKS=",
                                 eval('$IO::Socket::Socks::SOCKS_ERROR // ""'),
                                 ', SSL=',