20 stream:debug("Increasing handled stanzas to %d for %s", handled_stanza_count, stanza:top_tag()); |
20 stream:debug("Increasing handled stanzas to %d for %s", handled_stanza_count, stanza:top_tag()); |
21 end |
21 end |
22 end |
22 end |
23 |
23 |
24 -- Catch outgoing stanzas |
24 -- Catch outgoing stanzas |
25 function outgoing_stanza(stanza) |
25 local function outgoing_stanza(stanza) |
26 -- NOTE: This will not behave nice if stanzas are serialized before this point |
26 -- NOTE: This will not behave nice if stanzas are serialized before this point |
27 if stanza.name and not stanza.attr.xmlns then |
27 if stanza.name and not stanza.attr.xmlns then |
28 -- serialize stanzas in order to bypass this on resumption |
28 -- serialize stanzas in order to bypass this on resumption |
29 outgoing_queue[#outgoing_queue+1] = tostring(stanza); |
29 outgoing_queue[#outgoing_queue+1] = tostring(stanza); |
30 last_stanza_time = now(); |
30 last_stanza_time = now(); |