mod_log_json: Use correct method to specify remote endpoint
Fun fact, on TCP connections :connect and :setpeername is the same function
--- a/mod_log_json/mod_log_json.lua Wed Nov 13 17:54:54 2019 +0100
+++ b/mod_log_json/mod_log_json.lua Wed Nov 13 17:57:54 2019 +0100
@@ -16,7 +16,7 @@
end
elseif config.udp_host and config.udp_port then
local conn = socket.udp();
- conn:connect(config.udp_host, config.udp_port);
+ conn:setpeername(config.udp_host, config.udp_port);
function send(payload)
conn:send(payload);
end