Mercurial > 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 |
parents | fabff75bfc3f |
children | 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;