comparison mod_smacks/mod_smacks.lua @ 1703:a53385a78a64

mod_smacks: Add stanza counting filter when resuming session
author Kim Alvefur <zash@zash.se>
date Wed, 06 May 2015 00:58:55 +0200
parents 5f5ff061b316
children 97291a4b17bd
comparison
equal deleted inserted replaced
1702:725ebd494000 1703:a53385a78a64
122 end 122 end
123 123
124 local function wrap_session_in(session, resume) 124 local function wrap_session_in(session, resume)
125 if not resume then 125 if not resume then
126 session.handled_stanza_count = 0; 126 session.handled_stanza_count = 0;
127 add_filter(session, "stanzas/in", count_incoming_stanzas, 1000); 127 end
128 end 128 add_filter(session, "stanzas/in", count_incoming_stanzas, 1000);
129 129
130 return session; 130 return session;
131 end 131 end
132 132
133 local function wrap_session(session, resume) 133 local function wrap_session(session, resume)