Mercurial > prosody-hg
comparison plugins/mod_s2s/mod_s2s.lua @ 6626:071611bc4f1d
mod_s2s: Catch attempt to close dummy origin of s2s error replies (fixes a top level error)
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 05 Apr 2015 16:47:49 +0200 |
| parents | b6e558febb7a |
| children | 832987170da8 |
comparison
equal
deleted
inserted
replaced
| 6625:bae327ea487a | 6626:071611bc4f1d |
|---|---|
| 52 type = "s2sin"; | 52 type = "s2sin"; |
| 53 send = function(s) | 53 send = function(s) |
| 54 (session.log or log)("error", "Replying to to an s2s error reply, please report this! Traceback: %s", traceback()); | 54 (session.log or log)("error", "Replying to to an s2s error reply, please report this! Traceback: %s", traceback()); |
| 55 end; | 55 end; |
| 56 dummy = true; | 56 dummy = true; |
| 57 close = function () | |
| 58 (session.log or log)("error", "Attempting to close the dummy origin of s2s error replies, please report this! Traceback: %s", traceback()); | |
| 59 end; | |
| 57 }; | 60 }; |
| 58 for i, data in ipairs(sendq) do | 61 for i, data in ipairs(sendq) do |
| 59 local reply = data[2]; | 62 local reply = data[2]; |
| 60 if reply and not(reply.attr.xmlns) and bouncy_stanzas[reply.name] then | 63 if reply and not(reply.attr.xmlns) and bouncy_stanzas[reply.name] then |
| 61 reply.attr.type = "error"; | 64 reply.attr.type = "error"; |
