Changeset

2747:168104895051

sessionmanager, s2smanager: Close session on </stream:stream>
author Matthew Wild <mwild1@gmail.com>
date Thu, 11 Mar 2010 01:04:19 +0000
parents 2746:3b9547fc0bed
children 2748:85a242cd1bc4
files core/s2smanager.lua core/sessionmanager.lua
diffstat 2 files changed, 4 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/core/s2smanager.lua	Mon Mar 08 02:13:41 2010 +0000
+++ b/core/s2smanager.lua	Thu Mar 11 01:04:19 2010 +0000
@@ -434,11 +434,8 @@
 end
 
 function streamclosed(session)
-	(session.log or log)("debug", "</stream:stream>");
-	if session.sends2s then
-		session.sends2s("</stream:stream>");
-	end
-	session.notopen = true;
+	(session.log or log)("debug", "Received </stream:stream>");
+	session:close();
 end
 
 function initiate_dialback(session)
--- a/core/sessionmanager.lua	Mon Mar 08 02:13:41 2010 +0000
+++ b/core/sessionmanager.lua	Thu Mar 11 01:04:19 2010 +0000
@@ -211,8 +211,8 @@
 end
 
 function streamclosed(session)
-	session.send("</stream:stream>");
-	session.notopen = true;
+	session.log("debug", "Received </stream:stream>");
+	session:close();
 end
 
 function send_to_available_resources(user, host, stanza)