aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-04-08 20:19:55 +0100
committerMatthew Wild <mwild1@gmail.com>2009-04-08 20:19:55 +0100
commitf6a5da2375a21b7cd2429b7ba82d819683af5109 (patch)
tree7148b7e142e79cfc47dcec5f7e22f47a219946b3 /core/s2smanager.lua
parent9982558804de3976a3d5d9e12ab5215503420e0f (diff)
parentedd59b5d381bd8b0daee063a99f8678f86f6b9bb (diff)
downloadprosody-f6a5da2375a21b7cd2429b7ba82d819683af5109.tar.gz
prosody-f6a5da2375a21b7cd2429b7ba82d819683af5109.zip
Automated merge with http://waqas.ath.cx:8000/
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index 4c758159..0ef8e241 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -177,6 +177,11 @@ function attempt_connection(host_session, err)
return false;
end
+ if not (connect_host and connect_port) then
+ -- Likely we couldn't resolve DNS
+ return false;
+ end
+
-- Ok, we're going to try to connect
conn:settimeout(0);
local success, err = conn:connect(connect_host, connect_port);
@@ -245,7 +250,7 @@ function streamopened(session, attr)
end
function streamclosed(session)
- session.send("</stream:stream>");
+ session.sends2s("</stream:stream>");
session.notopen = true;
end