aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-07-08 02:27:33 +0100
committerMatthew Wild <mwild1@gmail.com>2009-07-08 02:27:33 +0100
commit40584eef53007604535163a3c2d2815f63151b99 (patch)
treee6feeb2fe552a349fed20481ae709fd538e9fa6e
parent55a4aba43837ed228153ff38faef177177b46980 (diff)
downloadprosody-40584eef53007604535163a3c2d2815f63151b99.tar.gz
prosody-40584eef53007604535163a3c2d2815f63151b99.zip
net.xmppclient_listener: Fix potential traceback when no reason is specified for closing a session
-rw-r--r--net/xmppclient_listener.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua
index 5e1a1ba3..fa676dfe 100644
--- a/net/xmppclient_listener.lua
+++ b/net/xmppclient_listener.lua
@@ -95,7 +95,7 @@ local function session_close(session, reason)
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