aboutsummaryrefslogtreecommitdiffstats
path: root/core/s2smanager.lua
diff options
context:
space:
mode:
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 aabfddd6..92f07354 100644
--- a/core/s2smanager.lua
+++ b/core/s2smanager.lua
@@ -504,6 +504,8 @@ function mark_connected(session)
end
end
+local function null_data_handler(conn, data) log("debug", "Discarding data from destroyed s2s session: %s", data); end
+
function destroy_session(session, reason)
(session.log or log)("info", "Destroying "..tostring(session.direction).." session "..tostring(session.from_host).."->"..tostring(session.to_host));
@@ -519,6 +521,7 @@ function destroy_session(session, reason)
session[k] = nil;
end
end
+ session.data = null_data_handler;
end
return _M;