diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-12-24 04:47:18 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-12-24 04:47:18 +0000 |
commit | d01658b1af0a9dfdd8d2999b99c49076b2b7330c (patch) | |
tree | d500c1518c0e934cd929d071145f08d93ef0eb3e /core | |
parent | 3fa84baafc2cef40ea6a31f26013609cba97ce56 (diff) | |
download | prosody-d01658b1af0a9dfdd8d2999b99c49076b2b7330c.tar.gz prosody-d01658b1af0a9dfdd8d2999b99c49076b2b7330c.zip |
s2smanager: retire_session(): Add a 'reason' parameter
Diffstat (limited to 'core')
-rw-r--r-- | core/s2smanager.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index a4fdcbb4..7c11cb9e 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -592,7 +592,7 @@ local resting_session = { -- Resting, not dead filter = function (type, data) return data; end; }; resting_session.__index = resting_session; -function retire_session(session) +function retire_session(session, reason) local log = session.log or log; for k in pairs(session) do if k ~= "trace" and k ~= "log" and k ~= "id" then @@ -600,6 +600,8 @@ function retire_session(session) end end + session.destruction_reason = reason; + function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); end function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end return setmetatable(session, resting_session); |