Changeset

1490:b5c59667a04c

net.xmppclient_listener: Fix potential traceback when no reason is specified for closing a session
author Matthew Wild <mwild1@gmail.com>
date Wed, 08 Jul 2009 02:27:33 +0100
parents 1489:4da0131a5ccb
children 1491:694a0a00e1a5
files net/xmppclient_listener.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/xmppclient_listener.lua	Mon Jul 06 01:40:43 2009 +0500
+++ b/net/xmppclient_listener.lua	Wed Jul 08 02:27:33 2009 +0100
@@ -95,7 +95,7 @@
 		end
 		session.send("</stream:stream>");
 		session.conn.close();
-		xmppclient.disconnect(session.conn, reason.condition or reason or "session closed");
+		xmppclient.disconnect(session.conn, (reason and reason.condition) or reason or "session closed");
 	end
 end