Comparison

plugins/mod_smacks.lua @ 12059:70a55fbe447c

mod_smacks: Stop stanzas from being queued on hibernation timeout This overloads that flag a bit, but it has the intended effect of stopping outgoing_stanza_filter() from queueing stanzas. Fixes a traceback because of the queue having been removed somewhere around here, since it is no longer needed. Thanks Martin for reporting
author Kim Alvefur <zash@zash.se>
date Thu, 16 Dec 2021 16:02:01 +0100
parent 12056:e62025f949f9
child 12060:3099e03b10bd
comparison
equal deleted inserted replaced
12058:4860da718e87 12059:70a55fbe447c
440 440
441 session.log("debug", "Destroying session for hibernating too long"); 441 session.log("debug", "Destroying session for hibernating too long");
442 session_registry[jid.join(session.username, session.host, session.resumption_token)] = nil; 442 session_registry[jid.join(session.username, session.host, session.resumption_token)] = nil;
443 old_session_registry:set(session.username, session.resumption_token, { h = session.handled_stanza_count }); 443 old_session_registry:set(session.username, session.resumption_token, { h = session.handled_stanza_count });
444 session.resumption_token = nil; 444 session.resumption_token = nil;
445 session.resending_unacked = true; -- stop outgoing_stanza_filter from re-queueing anything anymore
445 sessionmanager.destroy_session(session, "Hibernating too long"); 446 sessionmanager.destroy_session(session, "Hibernating too long");
446 end); 447 end);
447 if session.conn then 448 if session.conn then
448 session.conn:close(); 449 session.conn:close();
449 end 450 end