aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-12-17 21:50:02 +0000
committerMatthew Wild <mwild1@gmail.com>2009-12-17 21:50:02 +0000
commit90a40596380e94c8e47531db4dbf139ae5e836b7 (patch)
treea6c553a8130363505c86e68fe3f623ae487edb8d /core
parent31d67aa507d7f7cb4037da66be6cfde221af6678 (diff)
downloadprosody-90a40596380e94c8e47531db4dbf139ae5e836b7.tar.gz
prosody-90a40596380e94c8e47531db4dbf139ae5e836b7.zip
s2smanager: Give reasons to destroy_session in more cases, including when DNS lookup fails
Diffstat (limited to 'core')
-rw-r--r--core/s2smanager.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 38024dda..06ea247f 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -224,7 +224,7 @@ function attempt_connection(host_session, err)
if not ok then
if not attempt_connection(host_session, err) then
-- No more attempts will be made
- destroy_session(host_session);
+ destroy_session(host_session, err);
end
end
end, "_xmpp-server._tcp."..connect_host..".", "SRV");
@@ -284,7 +284,7 @@ function try_connect(host_session, connect_host, connect_port)
log("debug", "DNS lookup failed to get a response for %s", connect_host);
if not attempt_connection(host_session, "name resolution failed") then -- Retry if we can
log("debug", "No other records to try for %s - destroying", host_session.to_host);
- destroy_session(host_session); -- End of the line, we can't
+ destroy_session(host_session, "DNS resolution failed"); -- End of the line, we can't
end
end
end, connect_host, "A", "IN");