comparison mod_smacks/mod_smacks.lua @ 4631:921c607617b0

mod_smacks: Fix traceback on missing stanza counter This shouldn't be possible, yet it was.
author Kim Alvefur <zash@zash.se>
date Thu, 22 Jul 2021 17:26:32 +0200
parents f6f28ceff53a
children ab7dc5c5c782
comparison
equal deleted inserted replaced
4630:635907a5d2c8 4631:921c607617b0
261 session_registry.set(session.username, session.resumption_token, nil); 261 session_registry.set(session.username, session.resumption_token, nil);
262 old_session_registry.set(session.username, session.resumption_token, nil); 262 old_session_registry.set(session.username, session.resumption_token, nil);
263 session.resumption_token = nil; 263 session.resumption_token = nil;
264 end 264 end
265 -- send out last ack as per revision 1.5.2 of XEP-0198 265 -- send out last ack as per revision 1.5.2 of XEP-0198
266 if session.smacks and session.conn then 266 if session.smacks and session.conn and session.handled_stanza_count then
267 (session.sends2s or session.send)(st.stanza("a", { xmlns = session.smacks, h = string.format("%d", session.handled_stanza_count) })); 267 (session.sends2s or session.send)(st.stanza("a", { xmlns = session.smacks, h = string.format("%d", session.handled_stanza_count) }));
268 end 268 end
269 return session_close(...); 269 return session_close(...);
270 end 270 end
271 return session; 271 return session;