diff options
Diffstat (limited to 'core/s2smanager.lua')
-rw-r--r-- | core/s2smanager.lua | 3 |
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; |