Software /
code /
prosody
Changeset
6358:55fda5deb5d5
mod_compression: Handle compression setup errors by logging a warning about it (fixes #408)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 26 Aug 2014 12:19:27 +0200 |
parents | 6357:ccae56e34956 |
children | 6359:c74670b3be53 |
files | plugins/mod_compression.lua |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_compression.lua Tue Aug 26 12:02:41 2014 +0200 +++ b/plugins/mod_compression.lua Tue Aug 26 12:19:27 2014 +0200 @@ -147,6 +147,12 @@ end end); +module:hook("stanza/http://jabber.org/protocol/compress:failure", function(event) + local err = event.stanza:get_child(); + (event.origin.log or module._log)("warn", "Compression setup failed (%s)", err and err.name or "unknown reason"); + return true; +end); + module:hook("stanza/http://jabber.org/protocol/compress:compress", function(event) local session, stanza = event.origin, event.stanza;