aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_console.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_console.lua')
-rw-r--r--plugins/mod_console.lua4
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