# HG changeset patch # User Matthew Wild # Date 1263873319 0 # Node ID 48a209636a429525471a0723912ced2db1155010 # Parent 0b5f0ae7a6b1cd78a758781726d032ba507647db net.xmppserver_listener: Pass reason for session disconnection to disconnect handler, if known diff -r 0b5f0ae7a6b1 -r 48a209636a42 net/xmppserver_listener.lua --- 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