Changeset

988:c15cea87036f

mod_smacks: Wrap session:close() and make the session not resumable
author Kim Alvefur <zash@zash.se>
date Thu, 25 Apr 2013 17:37:33 +0200
parents 987:fabff75bfc3f
children 989:7c04c5856daa
files mod_smacks/mod_smacks.lua
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_smacks/mod_smacks.lua	Thu Apr 25 17:34:30 2013 +0200
+++ b/mod_smacks/mod_smacks.lua	Thu Apr 25 17:37:33 2013 +0200
@@ -101,6 +101,15 @@
 	else
 		session.send = new_send;
 	end
+
+	local session_close = session.close;
+	function session.close(...)
+		if session.resumption_token then
+			session_registry[session.resumption_token] = nil;
+			session.resumption_token = nil;
+		end
+		return session_close(...);
+	end
 	
 	if not resume then
 		session.handled_stanza_count = 0;