Changeset

1951:632039101699

xmppserver_listener: More forcefully close s2s connections (fixes fd leak)
author Matthew Wild <mwild1@gmail.com>
date Wed, 14 Oct 2009 14:07:50 +0100
parents 1949:e3d777d76b1a
children 1952:4a15b176fca8
files net/xmppserver_listener.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppserver_listener.lua	Tue Oct 13 11:12:49 2009 +0100
+++ b/net/xmppserver_listener.lua	Wed Oct 14 14:07:50 2009 +0100
@@ -99,6 +99,9 @@
 			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