# HG changeset patch # User Kim Alvefur # Date 1626967592 -7200 # Node ID 921c607617b0536debba00bce2db4ac7be90ec99 # Parent 635907a5d2c8597861eed3d968fadf1abb19702e mod_smacks: Fix traceback on missing stanza counter This shouldn't be possible, yet it was. diff -r 635907a5d2c8 -r 921c607617b0 mod_smacks/mod_smacks.lua --- a/mod_smacks/mod_smacks.lua Wed Jul 21 16:28:13 2021 +0200 +++ b/mod_smacks/mod_smacks.lua Thu Jul 22 17:26:32 2021 +0200 @@ -263,7 +263,7 @@ session.resumption_token = nil; end -- send out last ack as per revision 1.5.2 of XEP-0198 - if session.smacks and session.conn then + if session.smacks and session.conn and session.handled_stanza_count then (session.sends2s or session.send)(st.stanza("a", { xmlns = session.smacks, h = string.format("%d", session.handled_stanza_count) })); end return session_close(...);