Comparison

mod_smacks/mod_smacks.lua @ 2087:e48dbb640408

mod_smacks: Drop stanzas instead of turning them into the empty string
author Kim Alvefur <zash@zash.se>
date Wed, 16 Mar 2016 13:14:01 +0100
parent 1881:3683eb95bc1a
child 2088:7a29d8e3275b
comparison
equal deleted inserted replaced
2086:de6b95d5e01b 2087:e48dbb640408
83 83
84 queue[#queue+1] = cached_stanza; 84 queue[#queue+1] = cached_stanza;
85 session.log("debug", "#queue = %d", #queue); 85 session.log("debug", "#queue = %d", #queue);
86 if session.hibernating then 86 if session.hibernating then
87 session.log("debug", "hibernating, stanza queued"); 87 session.log("debug", "hibernating, stanza queued");
88 return ""; -- Hack to make session.send() not return nil 88 return nil;
89 end 89 end
90 if #queue > max_unacked_stanzas and not session.awaiting_ack then 90 if #queue > max_unacked_stanzas and not session.awaiting_ack then
91 session.awaiting_ack = true; 91 session.awaiting_ack = true;
92 return tostring(stanza)..tostring(st.stanza("r", { xmlns = session.smacks })); 92 return tostring(stanza)..tostring(st.stanza("r", { xmlns = session.smacks }));
93 end 93 end