Changeset

1422:db9cb1f24f38

xmppclient_listener: Pass session close reason to destroy_session (to be used in unavailable presence)
author Matthew Wild <mwild1@gmail.com>
date Fri, 26 Jun 2009 06:32:45 +0100
parents 1421:7dafb3bae02b
children 1423:5e72c3e1743a
files net/xmppclient_listener.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppclient_listener.lua	Fri Jun 26 10:02:46 2009 +0500
+++ b/net/xmppclient_listener.lua	Fri Jun 26 06:32:45 2009 +0100
@@ -95,7 +95,7 @@
 		end
 		session.send("</stream:stream>");
 		session.conn.close();
-		xmppclient.disconnect(session.conn, "stream error");
+		xmppclient.disconnect(session.conn, reason.condition or reason or "session closed");
 	end
 end
 
@@ -136,7 +136,7 @@
 	local session = sessions[conn];
 	if session then
 		(session.log or log)("info", "Client disconnected: %s", err);
-		sm_destroy_session(session);
+		sm_destroy_session(session, err);
 		sessions[conn]  = nil;
 		session = nil;
 		collectgarbage("collect");