# HG changeset patch # User Matthew Wild # Date 1261086602 0 # Node ID 5e37e28a429f6d541ad5640aa391f5f1982e6a53 # Parent 7926f513816b3c494cc61a030aab9e279f2d386c s2smanager: Give reasons to destroy_session in more cases, including when DNS lookup fails diff -r 7926f513816b -r 5e37e28a429f core/s2smanager.lua --- a/core/s2smanager.lua Thu Dec 17 21:38:16 2009 +0000 +++ b/core/s2smanager.lua Thu Dec 17 21:50:02 2009 +0000 @@ -224,7 +224,7 @@ 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 @@ 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");