changeset 14079:0ea2848d7771

prosodyctl: Only import "socket" in the root of the module
author Link Mauve <linkmauve@linkmauve.fr>
date Fri, 30 Jan 2026 14:44:04 +0100
parents d649d011df45
children 973609bad40a
files util/prosodyctl/check.lua
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl/check.lua	Fri Jan 30 14:08:53 2026 +0100
+++ b/util/prosodyctl/check.lua	Fri Jan 30 14:44:04 2026 +0100
@@ -75,7 +75,7 @@
 	local result = { warnings = {} };
 
 	-- Create UDP socket for communication with the server
-	local sock = assert(require "socket".udp());
+	local sock = assert(socket.udp());
 	do
 		local ok, err = sock:setsockname("*", 0);
 		if not ok then
@@ -1146,8 +1146,7 @@
 				local http_internal_host = http_host;
 				local http_url = api(host):get_option_string("http_external_url");
 				if http_url then
-					local url_parse = require "socket.url".parse;
-					local external_url_parts = url_parse(http_url);
+					local external_url_parts = socket_url.parse(http_url);
 					if external_url_parts then
 						http_host = external_url_parts.host;
 					else