Changeset

3950:27947d66b814

s2smanager: retire_session(): Add a 'reason' parameter
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 Dec 2010 04:47:18 +0000
parents 3949:fc4ff6db1e57
children 3951:b8d930c21a3a
files core/s2smanager.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/s2smanager.lua	Wed Dec 22 23:30:47 2010 +0000
+++ b/core/s2smanager.lua	Fri Dec 24 04:47:18 2010 +0000
@@ -592,7 +592,7 @@
 		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 @@
 		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);