Comparison

plugins/mod_smacks.lua @ 11982:c7c0c40487e2

mod_smacks: Ensure hibernating session is not connected Turns out that if you destroy a session from inside prosody, it goes into hibernation but stays connected and continues processing stanzas.
author Kim Alvefur <zash@zash.se>
date Thu, 02 Dec 2021 03:03:44 +0100
parent 11981:5d8264f464a2
child 11983:27f2539b4f87
comparison
equal deleted inserted replaced
11981:5d8264f464a2 11982:c7c0c40487e2
512 sessionmanager.destroy_session(session); 512 sessionmanager.destroy_session(session);
513 else 513 else
514 session.log("debug", "Session resumed before hibernation timeout, all is well") 514 session.log("debug", "Session resumed before hibernation timeout, all is well")
515 end 515 end
516 end); 516 end);
517 if session.conn then
518 session.conn:close();
519 end
517 return true; -- Postpone destruction for now 520 return true; -- Postpone destruction for now
518 end 521 end
519 end 522 end
520 end); 523 end);
521 524