aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/sessionmanager.lua3
-rw-r--r--plugins/mod_c2s.lua1
2 files changed, 2 insertions, 2 deletions
diff --git a/core/sessionmanager.lua b/core/sessionmanager.lua
index ab06e6c0..750007fb 100644
--- a/core/sessionmanager.lua
+++ b/core/sessionmanager.lua
@@ -100,8 +100,7 @@ local function update_session(to_session, from_session)
local replaced_conn = to_session.conn;
if replaced_conn then
- to_session.log("debug", "closing a replaced connection for this session");
- replaced_conn:close();
+ to_session.conn = nil;
end
to_session.since = from_session.since;
diff --git a/plugins/mod_c2s.lua b/plugins/mod_c2s.lua
index 9af21759..e189498c 100644
--- a/plugins/mod_c2s.lua
+++ b/plugins/mod_c2s.lua
@@ -273,6 +273,7 @@ module:hook_global("c2s-session-updated", function (event)
local replaced_conn = event.replaced_conn;
if replaced_conn then
sessions[replaced_conn] = nil;
+ replaced_conn:close();
end
end);