Mercurial > prosody-modules
comparison mod_smacks/mod_smacks.lua @ 891:e089160c424b
mod_smacks: 'reason' parameter of session:close() changed to make nil and false mean 'graceful close' in 9da430b69f13
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 03 Jan 2013 00:34:30 +0100 |
parents | 0095b74a3685 |
children | abf0f12fe75c |
comparison
equal
deleted
inserted
replaced
890:7ac1b8a799be | 891:e089160c424b |
---|---|
201 end | 201 end |
202 end | 202 end |
203 | 203 |
204 module:hook("pre-resource-unbind", function (event) | 204 module:hook("pre-resource-unbind", function (event) |
205 local session, err = event.session, event.error; | 205 local session, err = event.session, event.error; |
206 if session.smacks and err ~= "session closed" then | 206 if session.smacks and err then |
207 if not session.resumption_token then | 207 if not session.resumption_token then |
208 local queue = session.outgoing_stanza_queue; | 208 local queue = session.outgoing_stanza_queue; |
209 if #queue > 0 then | 209 if #queue > 0 then |
210 module:log("warn", "Destroying session with %d unacked stanzas:", #queue); | 210 module:log("warn", "Destroying session with %d unacked stanzas:", #queue); |
211 for i=1,#queue do | 211 for i=1,#queue do |