Changeset

3748:27abf3b6819a

mod_log_json: Use correct method to specify remote endpoint Fun fact, on TCP connections :connect and :setpeername is the same function
author Kim Alvefur <zash@zash.se>
date Wed, 13 Nov 2019 17:57:54 +0100
parents 3747:f288177f4c5d
children 3749:cb61f0e06de3
files mod_log_json/mod_log_json.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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