Diff

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
line wrap: on
line diff
--- a/plugins/mod_smacks.lua	Thu Dec 16 12:16:45 2021 +0100
+++ b/plugins/mod_smacks.lua	Thu Dec 16 16:02:01 2021 +0100
@@ -442,6 +442,7 @@
 		session_registry[jid.join(session.username, session.host, session.resumption_token)] = nil;
 		old_session_registry:set(session.username, session.resumption_token, { h = session.handled_stanza_count });
 		session.resumption_token = nil;
+		session.resending_unacked = true; -- stop outgoing_stanza_filter from re-queueing anything anymore
 		sessionmanager.destroy_session(session, "Hibernating too long");
 	end);
 	if session.conn then