Changeset

11982:c7c0c40487e2

mod_smacks: Ensure hibernating session is not connected Turns out that if you destroy a session from inside prosody, it goes into hibernation but stays connected and continues processing stanzas.
author Kim Alvefur <zash@zash.se>
date Thu, 02 Dec 2021 03:03:44 +0100
parents 11981:5d8264f464a2
children 11983:27f2539b4f87
files plugins/mod_smacks.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_smacks.lua	Wed Dec 01 23:18:18 2021 +0100
+++ b/plugins/mod_smacks.lua	Thu Dec 02 03:03:44 2021 +0100
@@ -514,6 +514,9 @@
 					session.log("debug", "Session resumed before hibernation timeout, all is well")
 				end
 			end);
+			if session.conn then
+				session.conn:close();
+			end
 			return true; -- Postpone destruction for now
 		end
 	end