Diff

net/xmppclient_listener.lua @ 1560:a8c14a350de5

xmppclient_listener: Use error text as disconnect reason if there is any
author Matthew Wild <mwild1@gmail.com>
date Sat, 18 Jul 2009 18:49:54 +0100
parent 1523:841d61be198f
child 1605:f6bd13fe1cb1
line wrap: on
line diff
--- a/net/xmppclient_listener.lua	Sat Jul 18 18:37:06 2009 +0100
+++ b/net/xmppclient_listener.lua	Sat Jul 18 18:49:54 2009 +0100
@@ -95,7 +95,7 @@
 		end
 		session.send("</stream:stream>");
 		session.conn.close();
-		xmppclient.disconnect(session.conn, (reason and reason.condition) or reason or "session closed");
+		xmppclient.disconnect(session.conn, (reason and (reason.text or reason.condition)) or reason or "session closed");
 	end
 end