aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_s2s/mod_s2s.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2017-09-25 23:12:47 +0100
committerMatthew Wild <mwild1@gmail.com>2017-09-25 23:12:47 +0100
commit63252575dfc7c74434c642beafd29e34e3c89c62 (patch)
tree69935cea9d1df264c65044bab938330ff25a8a23 /plugins/mod_s2s/mod_s2s.lua
parent1d6c894c607ca84a86e502fcf796a0c87496537a (diff)
downloadprosody-63252575dfc7c74434c642beafd29e34e3c89c62.tar.gz
prosody-63252575dfc7c74434c642beafd29e34e3c89c62.zip
mod_s2s: Use a separate resolver object for each outgoing session
Cleaner approach hopefully fixes problems with some peoples' DNS hanging after a while, failed DNS when a large number of queries are made at once, and source port re-use. Related issues: #487, 761, #991, #992, #1001
Diffstat (limited to 'plugins/mod_s2s/mod_s2s.lua')
-rw-r--r--plugins/mod_s2s/mod_s2s.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_s2s/mod_s2s.lua b/plugins/mod_s2s/mod_s2s.lua
index c060b974..aa7fe8b6 100644
--- a/plugins/mod_s2s/mod_s2s.lua
+++ b/plugins/mod_s2s/mod_s2s.lua
@@ -174,6 +174,7 @@ end
-- Stream is authorised, and ready for normal stanzas
function mark_connected(session)
+
local sendq = session.sendq;
local from, to = session.from_host, session.to_host;
@@ -205,6 +206,7 @@ function mark_connected(session)
session.sendq = nil;
end
+ session.resolver = nil;
session.ip_hosts = nil;
session.srv_hosts = nil;
end