Software /
code /
prosody-modules
Diff
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 |
parent | 987:fabff75bfc3f |
child | 994:487cd02aada0 |
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;