diff options
author | Kim Alvefur <zash@zash.se> | 2014-08-26 12:19:27 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-08-26 12:19:27 +0200 |
commit | 1f1971f1264664ef6efec8e9ebd474e1406447c8 (patch) | |
tree | 548f52a776ba823e30b0447715782cee26863861 /plugins/mod_compression.lua | |
parent | bdcf8cd9da18672454dd03c625f01ede579d8cd2 (diff) | |
download | prosody-1f1971f1264664ef6efec8e9ebd474e1406447c8.tar.gz prosody-1f1971f1264664ef6efec8e9ebd474e1406447c8.zip |
mod_compression: Handle compression setup errors by logging a warning about it (fixes #408)
Diffstat (limited to 'plugins/mod_compression.lua')
-rw-r--r-- | plugins/mod_compression.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/plugins/mod_compression.lua b/plugins/mod_compression.lua index 531ea8ea..1ec4c85a 100644 --- a/plugins/mod_compression.lua +++ b/plugins/mod_compression.lua @@ -147,6 +147,12 @@ module:hook("stanza/http://jabber.org/protocol/compress:compressed", function(ev 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; |