diff options
author | Matthew Wild <mwild1@gmail.com> | 2008-10-24 18:14:40 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2008-10-24 18:14:40 +0100 |
commit | e5e08115529706bb11b6a244ff28340cc1ea8ba6 (patch) | |
tree | b23a65746327cae09bdb3e07feb36c05e70d4baa | |
parent | c91a86c73a581733158cc09e8ba4583b079b10f2 (diff) | |
download | prosody-e5e08115529706bb11b6a244ff28340cc1ea8ba6.tar.gz prosody-e5e08115529706bb11b6a244ff28340cc1ea8ba6.zip |
other half of previous commit
-rw-r--r-- | core/s2smanager.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/s2smanager.lua b/core/s2smanager.lua index 38919d81..ba14f2fe 100644 --- a/core/s2smanager.lua +++ b/core/s2smanager.lua @@ -179,4 +179,18 @@ function mark_connected(session) end end +function destroy_session(session) + (session.log or log)("info", "Destroying session"); + if session.direction == "outgoing" then + hosts[session.to_host] = nil; + end + session.conn = nil; + session.disconnect = nil; + for k in pairs(session) do + if k ~= "trace" then + session[k] = nil; + end + end +end + return _M;
\ No newline at end of file |