# HG changeset patch # User Kim Alvefur # Date 1366904253 -7200 # Node ID c15cea87036fddda2c96b7e3be549ea290499c15 # Parent fabff75bfc3f714b67d2940505c82a2bd47badea mod_smacks: Wrap session:close() and make the session not resumable diff -r fabff75bfc3f -r c15cea87036f mod_smacks/mod_smacks.lua --- 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;