Comparison

mod_smacks/mod_smacks.lua @ 1024:d7655e634c30

mod_smacks: Allow resumption if the TCP connection is closed from our end, c15cea87036f ensures distinction from cleanly closed streams (thanks Lance)
author Kim Alvefur <zash@zash.se>
date Wed, 29 May 2013 11:37:42 +0200
parent 994:487cd02aada0
child 1293:ddbc1eb8d431
comparison
equal deleted inserted replaced
1023:83f56d3a07f5 1024:d7655e634c30
215 end 215 end
216 end 216 end
217 217
218 module:hook("pre-resource-unbind", function (event) 218 module:hook("pre-resource-unbind", function (event)
219 local session, err = event.session, event.error; 219 local session, err = event.session, event.error;
220 if session.smacks and err then 220 if session.smacks then
221 if not session.resumption_token then 221 if not session.resumption_token then
222 local queue = session.outgoing_stanza_queue; 222 local queue = session.outgoing_stanza_queue;
223 if #queue > 0 then 223 if #queue > 0 then
224 module:log("warn", "Destroying session with %d unacked stanzas:", #queue); 224 module:log("warn", "Destroying session with %d unacked stanzas:", #queue);
225 for i=1,#queue do 225 for i=1,#queue do