Changeset

2465:48a209636a42

net.xmppserver_listener: Pass reason for session disconnection to disconnect handler, if known
author Matthew Wild <mwild1@gmail.com>
date Tue, 19 Jan 2010 03:55:19 +0000
parents 2464:0b5f0ae7a6b1
children 2466:0e44b6035210
files net/xmppserver_listener.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppserver_listener.lua	Tue Jan 19 03:52:41 2010 +0000
+++ b/net/xmppserver_listener.lua	Tue Jan 19 03:55:19 2010 +0000
@@ -104,7 +104,7 @@
 			session.conn:close(true); -- Force FIXME: timer?
 		end
 		session.conn:close();
-		xmppserver.ondisconnect(session.conn, "stream error");
+		xmppserver.ondisconnect(session.conn, (reason and (reason.text or reason.condition)) or reason or "stream closed");
 	end
 end