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
commit86ee041be81ad313a24c87b6e38f92fe4400cf17 (patch)
tree69935cea9d1df264c65044bab938330ff25a8a23 /plugins/mod_s2s/mod_s2s.lua
parenta2e27dd4fb9e2f8a6c1d46958b878f78d872eba8 (diff)
downloadprosody-86ee041be81ad313a24c87b6e38f92fe4400cf17.tar.gz
prosody-86ee041be81ad313a24c87b6e38f92fe4400cf17.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