Diff

plugins/mod_c2s.lua @ 13095:1693bd4de283

core.sessionmanager: Delay closing a replaced connection after replacement Closing the session invokes ondisconnect and session close logic, including mod_smacks hibernation and the timer that destroys the session after a timeout. By closing the connection after it has been detached from the sessions table it will no longer invoke the ondetach handler, which should prevent the above problem.
author Kim Alvefur <zash@zash.se>
date Sun, 07 May 2023 12:27:55 +0200
parent 13093:93c68c454cb8
child 13209:c8d949cf6b09
line wrap: on
line diff
--- a/plugins/mod_c2s.lua	Thu May 04 17:30:40 2023 +0200
+++ b/plugins/mod_c2s.lua	Sun May 07 12:27:55 2023 +0200
@@ -273,6 +273,7 @@
 	local replaced_conn = event.replaced_conn;
 	if replaced_conn then
 		sessions[replaced_conn] = nil;
+		replaced_conn:close();
 	end
 end);