diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-06-26 06:32:45 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-06-26 06:32:45 +0100 |
commit | 87ffa5ec0f9f2860a5ae44342cce3336d4d42561 (patch) | |
tree | a2cd2ba3012305fce8594f961df587c67ac8dd3c /net | |
parent | 4a32c9a750cfacc44c4f282a3f2424226169b41b (diff) | |
download | prosody-87ffa5ec0f9f2860a5ae44342cce3336d4d42561.tar.gz prosody-87ffa5ec0f9f2860a5ae44342cce3336d4d42561.zip |
xmppclient_listener: Pass session close reason to destroy_session (to be used in unavailable presence)
Diffstat (limited to 'net')
-rw-r--r-- | net/xmppclient_listener.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/xmppclient_listener.lua b/net/xmppclient_listener.lua index 617f0467..5e1a1ba3 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, "stream error"); + xmppclient.disconnect(session.conn, reason.condition or reason or "session closed"); end end @@ -136,7 +136,7 @@ function xmppclient.disconnect(conn, err) local session = sessions[conn]; if session then (session.log or log)("info", "Client disconnected: %s", err); - sm_destroy_session(session); + sm_destroy_session(session, err); sessions[conn] = nil; session = nil; collectgarbage("collect"); |