aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-19 03:55:19 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-19 03:55:19 +0000
commite5a65ba7a39895a2784f5eb095cf7ab0ae6fb4a8 (patch)
tree57e1f91cf1493b641ce9ee15780a29cbf9021593
parenta1ca8f3d8a1cd6cbf85817ec06441aa8a57d649a (diff)
downloadprosody-e5a65ba7a39895a2784f5eb095cf7ab0ae6fb4a8.tar.gz
prosody-e5a65ba7a39895a2784f5eb095cf7ab0ae6fb4a8.zip
net.xmppserver_listener: Pass reason for session disconnection to disconnect handler, if known
-rw-r--r--net/xmppserver_listener.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/xmppserver_listener.lua b/net/xmppserver_listener.lua
index f49b29fc..af3009de 100644
--- a/net/xmppserver_listener.lua
+++ b/net/xmppserver_listener.lua
@@ -104,7 +104,7 @@ local function session_close(session, reason)
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