Mercurial > prosody-modules
comparison mod_smacks/mod_smacks.lua @ 2089:964b3d649a36
mod_smacks: Increase delay for starting s2s smacks to a non-zero value
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 16 Mar 2016 13:27:40 +0100 |
| parents | 7a29d8e3275b |
| children | 1796a022dd29 |
comparison
equal
deleted
inserted
replaced
| 2088:7a29d8e3275b | 2089:964b3d649a36 |
|---|---|
| 169 module:hook_stanza(xmlns_sm2, "enable", function (session, stanza) return handle_enable(session, stanza, xmlns_sm2); end, 100); | 169 module:hook_stanza(xmlns_sm2, "enable", function (session, stanza) return handle_enable(session, stanza, xmlns_sm2); end, 100); |
| 170 module:hook_stanza(xmlns_sm3, "enable", function (session, stanza) return handle_enable(session, stanza, xmlns_sm3); end, 100); | 170 module:hook_stanza(xmlns_sm3, "enable", function (session, stanza) return handle_enable(session, stanza, xmlns_sm3); end, 100); |
| 171 | 171 |
| 172 module:hook_stanza("http://etherx.jabber.org/streams", "features", | 172 module:hook_stanza("http://etherx.jabber.org/streams", "features", |
| 173 function (session, stanza) | 173 function (session, stanza) |
| 174 module:add_timer(0, function () | 174 module:add_timer(1e-6, function () |
| 175 if can_do_smacks(session) then | 175 if can_do_smacks(session) then |
| 176 if stanza:get_child("sm", xmlns_sm3) then | 176 if stanza:get_child("sm", xmlns_sm3) then |
| 177 session.sends2s(st.stanza("enable", sm3_attr)); | 177 session.sends2s(st.stanza("enable", sm3_attr)); |
| 178 session.smacks = xmlns_sm3; | 178 session.smacks = xmlns_sm3; |
| 179 elseif stanza:get_child("sm", xmlns_sm2) then | 179 elseif stanza:get_child("sm", xmlns_sm2) then |
