From 7badf61246f39df241a0d47eb433dc93eb05b6a5 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 16 Mar 2022 19:32:17 +0100 Subject: mod_admin_socket: Comment on LuaSocket UNIX compat code Ref #1717 --- util/adminstream.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util') diff --git a/util/adminstream.lua b/util/adminstream.lua index 8611310a..4075aa05 100644 --- a/util/adminstream.lua +++ b/util/adminstream.lua @@ -140,6 +140,12 @@ end local function new_connection(socket_path, listeners) local have_unix, unix = pcall(require, "socket.unix"); if have_unix and type(unix) == "function" then + -- COMPAT #1717 + -- Before the introduction of datagram support, only the stream socket + -- constructor was exported instead of a module table. Due to the lack of a + -- proper release of LuaSocket, distros have settled on shipping either the + -- last RC tag or some commit since then. + -- Here we accomodate both variants. unix = { stream = unix }; end if type(unix) ~= "table" then -- cgit v1.2.3