diff options
author | Kim Alvefur <zash@zash.se> | 2023-05-07 12:27:55 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2023-05-07 12:27:55 +0200 |
commit | 33c20d9cf432a5c4c2d380ce22e728344c259983 (patch) | |
tree | bfa1fa133d5ad5528b7162ecd0365b06080f51c6 /plugins/mod_c2s.lua | |
parent | a50732a06110be1cf53e6e54707d73e47a1af83f (diff) | |
download | prosody-33c20d9cf432a5c4c2d380ce22e728344c259983.tar.gz prosody-33c20d9cf432a5c4c2d380ce22e728344c259983.zip |
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.
Diffstat (limited to 'plugins/mod_c2s.lua')
-rw-r--r-- | plugins/mod_c2s.lua | 1 |
1 files changed, 1 insertions, 0 deletions
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); |