aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_admin_socket.lua3
-rw-r--r--util/adminstream.lua3
2 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_admin_socket.lua b/plugins/mod_admin_socket.lua
index b197adae..5eaef2e7 100644
--- a/plugins/mod_admin_socket.lua
+++ b/plugins/mod_admin_socket.lua
@@ -2,6 +2,9 @@ module:set_global();
local have_unix, unix = pcall(require, "socket.unix");
+if have_unix and type(unix) == "function" then
+ unix = { stream = unix };
+end
if not have_unix or type(unix) ~= "table" then
module:log_status("error", "LuaSocket unix socket support not available or incompatible, ensure it is up to date");
return;
diff --git a/util/adminstream.lua b/util/adminstream.lua
index 703deb07..8611310a 100644
--- a/util/adminstream.lua
+++ b/util/adminstream.lua
@@ -139,6 +139,9 @@ end
local function new_connection(socket_path, listeners)
local have_unix, unix = pcall(require, "socket.unix");
+ if have_unix and type(unix) == "function" then
+ unix = { stream = unix };
+ end
if type(unix) ~= "table" then
have_unix = false;
end