Diff

plugins/mod_s2s/s2sout.lib.lua @ 8899:c72a6226ee31

mod_s2s: Fix DNS timeout setting for per-session resolvers (fixes #1167)
author Kim Alvefur <zash@zash.se>
date Sat, 09 Jun 2018 00:09:25 +0200
parent 8267:42fad8465537
child 8902:ac21f13798ae
line wrap: on
line diff
--- a/plugins/mod_s2s/s2sout.lib.lua	Sun Jun 03 00:40:42 2018 +0200
+++ b/plugins/mod_s2s/s2sout.lib.lua	Sat Jun 09 00:09:25 2018 +0200
@@ -30,7 +30,6 @@
 local has_ipv4, has_ipv6;
 
 local dns_timeout = module:get_option_number("dns_timeout", 15);
-dns.settimeout(dns_timeout);
 
 local s2sout = {};
 
@@ -50,6 +49,7 @@
 	host_session.version = 1;
 
 	host_session.resolver = adns.resolver();
+	host_session.resolver._resolver:settimeout(dns_timeout);
 
 	-- Kick the connection attempting machine into life
 	if not s2sout.attempt_connection(host_session) then