aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-12 17:14:54 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-12 17:14:54 +0000
commit2739ed3948b9df3a596d6aef6d6790f1c2e1c59f (patch)
treedbefc3dcf32247c14c70f9ed966bf5ae87f04726 /core/s2smanager.lua
parent8e47276e919b4bd9b50916c9831e96158c0eeb4f (diff)
downloadprosody-2739ed3948b9df3a596d6aef6d6790f1c2e1c59f.tar.gz
prosody-2739ed3948b9df3a596d6aef6d6790f1c2e1c59f.zip
sessionmanager, s2smanager: Give sessions dummy data handlers that log when data is received by a destroyed session
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r--core/s2smanager.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua
index bfa3069a..7de97d0c 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -491,6 +491,8 @@ function mark_connected(session)
end
end
+local function null_data_handler(data) log("debug", "Discarding data from destroyed s2s session: %s", data); end
+
function destroy_session(session)
(session.log or log)("info", "Destroying "..tostring(session.direction).." session "..tostring(session.from_host).."->"..tostring(session.to_host));
@@ -506,6 +508,7 @@ function destroy_session(session)
session[k] = nil;
end
end
+ session.data = null_data_handler;
end
return _M;