From e90e8b9548bee4abef01c1426db2541a01f8d003 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 6 Feb 2019 11:07:40 +0000 Subject: 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. --- lib/PublicInbox/Daemon.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- cgit v1.2.3-24-ge0c7