Diff

net/xmppclient_listener.lua @ 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
parent 1255:a25b12c105bb
child 1490:b5c59667a04c
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");