diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-03-19 09:28:59 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-03-19 09:28:59 +0000 |
commit | 8633709b9f56c5a875bb7c47a4fa5669f438882f (patch) | |
tree | c0d7d99a90ace5283e7013b0020105a7aeff6fc7 /util/adminstream.lua | |
parent | 860f7d6b7dfccfe3dee023d5cec8130379c5c85c (diff) | |
parent | d0bd1e71d926424142a139eb63ac148eb888a871 (diff) | |
download | prosody-8633709b9f56c5a875bb7c47a4fa5669f438882f.tar.gz prosody-8633709b9f56c5a875bb7c47a4fa5669f438882f.zip |
Merge 0.12->trunk
Diffstat (limited to 'util/adminstream.lua')
-rw-r--r-- | util/adminstream.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/adminstream.lua b/util/adminstream.lua index 703deb07..4075aa05 100644 --- a/util/adminstream.lua +++ b/util/adminstream.lua @@ -139,6 +139,15 @@ 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 have_unix = false; end |