From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 702C7211B5 for ; Wed, 6 Feb 2019 11:07:41 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] daemon: die properly when Socket6 is missing Date: Wed, 6 Feb 2019 11:07:40 +0000 Message-Id: <20190206110741.30661-2-e@80x24.org> In-Reply-To: <20190206110741.30661-1-e@80x24.org> References: <20190206110741.30661-1-e@80x24.org> List-Id: 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 6aa4a19..033dd98 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); -- EW