diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-09-24 23:44:13 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-09-24 23:44:13 +0100 |
commit | 467f2e52aa1fe8399ce28e0c449cd44274f4f603 (patch) | |
tree | a14694e54207a5a0d8f6b274e800fad8588fbfa8 /plugins | |
parent | 775c721023130e7ced2abb28ec7ff3a035328253 (diff) | |
download | prosody-467f2e52aa1fe8399ce28e0c449cd44274f4f603.tar.gz prosody-467f2e52aa1fe8399ce28e0c449cd44274f4f603.zip |
mod_console: s2s:close: Use session:close() if that exists, otherwise just destroy the session
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_console.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_console.lua b/plugins/mod_console.lua index b3963d6c..716c2525 100644 --- a/plugins/mod_console.lua +++ b/plugins/mod_console.lua @@ -496,7 +496,7 @@ function def_env.s2s:close(from, to) if not session then print("No outgoing connection from "..from.." to "..to) else - s2smanager.destroy_session(session); + (session.close or s2smanager.destroy_session)(session); count = count + 1; print("Closed outgoing session from "..from.." to "..to); end @@ -504,7 +504,7 @@ function def_env.s2s:close(from, to) -- Is an incoming connection for session in pairs(incoming_s2s) do if session.to_host == to and session.from_host == from then - s2smanager.destroy_session(session); + (session.close or s2smanager.destroy_session)(session); count = count + 1; end end |