aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-12-24 04:47:18 +0000
committerMatthew Wild <mwild1@gmail.com>2010-12-24 04:47:18 +0000
commit208c7ca51180cd51fef6b5862bc948c3a656cd30 (patch)
tree231ca3c07c1c4fcba9de5aff9083bfe6bd9a397d
parentc63e6361ada543078637d762b8b643f051b6d745 (diff)
downloadprosody-208c7ca51180cd51fef6b5862bc948c3a656cd30.tar.gz
prosody-208c7ca51180cd51fef6b5862bc948c3a656cd30.zip
s2smanager: retire_session(): Add a 'reason' parameter
-rw-r--r--core/s2smanager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index b8163efa..212a2fe1 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -555,7 +555,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
@@ -563,6 +563,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);