From: Eric Wong Date: Wed, 6 Feb 2019 11:07:40 +0000 (+0000) Subject: daemon: die properly when Socket6 is missing X-Git-Tag: v1.2.0~366 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e90e8b9548bee4abef01c1426db2541a01f8d003;p=public-inbox.git daemon: die properly when Socket6 is missing We need to keep Unix-socket-only httpd instances working without Socket6. This fixes t/httpd-unix.t with Socket6 uninstalled. --- diff --git a/lib/PublicInbox/Daemon.pm b/lib/PublicInbox/Daemon.pm index 6aa4a194..033dd98a 100644 --- a/lib/PublicInbox/Daemon.pm +++ b/lib/PublicInbox/Daemon.pm @@ -241,8 +241,8 @@ sub unpack_ipv6 ($) { # (perl-modules-5.24 in Debian) # SpamAssassin and Net::Server use Socket6, so it may be installed - # on our system, already: - eval { require Socket6 } or return ('???-Socket6-missing', 0); + # on our system, already (otherwise die): + require Socket6; my ($port, $host) = Socket6::unpack_sockaddr_in6($addr); $host = Socket6::inet_ntop(Socket6::AF_INET6(), $host);