aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-10-14 14:07:50 +0100
committerMatthew Wild <mwild1@gmail.com>2009-10-14 14:07:50 +0100
commit1fe62686b100b51fb740f93efcbfb1646fcb11d3 (patch)
treeafdadf08c43b61fec25d24f25281ca808d94bbb3
parent396757941327fb937b8f05a3d7822e6ce65efa0c (diff)
downloadprosody-1fe62686b100b51fb740f93efcbfb1646fcb11d3.tar.gz
prosody-1fe62686b100b51fb740f93efcbfb1646fcb11d3.zip
xmppserver_listener: More forcefully close s2s connections (fixes fd leak)
-rw-r--r--net/xmppserver_listener.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua
index 81d26526..0b887b87 100644
--- a/net/xmppserver_listener.lua
+++ b/net/xmppserver_listener.lua
@@ -99,6 +99,9 @@ local function session_close(session, reason)
end
end
session.sends2s("</stream:stream>");
+ if sesson.notopen or not session.conn.close() then
+ session.conn.close(true); -- Force FIXME: timer?
+ end
session.conn.close();
xmppserver.disconnect(session.conn, "stream error");
end