# HG changeset patch # User Matthew Wild # Date 1278594112 -3600 # Node ID d11478ae374e9ede30fa6ed4cee559b729b10487 # Parent bc24f58a0d3976622620cdd1d4d7b58419167d4b mod_smacks: Clean outgoing stanza queue correctly on session close diff -r bc24f58a0d39 -r d11478ae374e mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Thu Jul 08 14:01:32 2010 +0100 +++ b/mod_smacks/mod_smacks.lua Thu Jul 08 14:01:52 2010 +0100 @@ -90,6 +90,7 @@ local queue = session.outgoing_stanza_queue; local error_attr = { type = "cancel" }; if #queue > 0 then + session.outgoing_stanza_queue = {}; for i=1,#queue do local reply = queue[i]; if reply.attr.to ~= session.full_jid then @@ -98,7 +99,6 @@ :tag("recipient-unavailable", {xmlns = "urn:ietf:params:xml:ns:xmpp-stanzas"}); core_process_stanza(session, queue[i]); end - queue[i] = nil; end end end