Comparison

util/adminstream.lua @ 12415:01ba67e7f824

Merge 0.12->trunk
author Matthew Wild <mwild1@gmail.com>
date Sat, 19 Mar 2022 09:28:59 +0000
parent 12393:6966026262f4
child 12852:c35afa353f8f
comparison
equal deleted inserted replaced
12413:e155f4509954 12415:01ba67e7f824
137 137
138 --- Public methods 138 --- Public methods
139 139
140 local function new_connection(socket_path, listeners) 140 local function new_connection(socket_path, listeners)
141 local have_unix, unix = pcall(require, "socket.unix"); 141 local have_unix, unix = pcall(require, "socket.unix");
142 if have_unix and type(unix) == "function" then
143 -- COMPAT #1717
144 -- Before the introduction of datagram support, only the stream socket
145 -- constructor was exported instead of a module table. Due to the lack of a
146 -- proper release of LuaSocket, distros have settled on shipping either the
147 -- last RC tag or some commit since then.
148 -- Here we accomodate both variants.
149 unix = { stream = unix };
150 end
142 if type(unix) ~= "table" then 151 if type(unix) ~= "table" then
143 have_unix = false; 152 have_unix = false;
144 end 153 end
145 local conn, sock; 154 local conn, sock;
146 155