comparison mod_smacks/mod_smacks.lua @ 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 fabff75bfc3f
children 487cd02aada0
comparison
equal deleted inserted replaced
987:fabff75bfc3f 988:c15cea87036f
98 98
99 if session.sends2s then 99 if session.sends2s then
100 session.sends2s = new_send; 100 session.sends2s = new_send;
101 else 101 else
102 session.send = new_send; 102 session.send = new_send;
103 end
104
105 local session_close = session.close;
106 function session.close(...)
107 if session.resumption_token then
108 session_registry[session.resumption_token] = nil;
109 session.resumption_token = nil;
110 end
111 return session_close(...);
103 end 112 end
104 113
105 if not resume then 114 if not resume then
106 session.handled_stanza_count = 0; 115 session.handled_stanza_count = 0;
107 add_filter(session, "stanzas/in", function (stanza) 116 add_filter(session, "stanzas/in", function (stanza)