Mercurial > prosody-hg
diff util/xmppstream.lua @ 11560:3bbb1af92514
Merge 0.11->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 13 May 2021 11:17:13 +0100 |
| parents | 83822be7704d dd21eb632f52 |
| children | d10957394a3c aa29d5144c20 |
line wrap: on
line diff
--- a/util/xmppstream.lua Fri May 07 16:47:58 2021 +0200 +++ b/util/xmppstream.lua Thu May 13 11:17:13 2021 +0100 @@ -22,7 +22,7 @@ local lxp_supports_xmldecl = pcall(lxp.new, { XmlDecl = false }); local lxp_supports_bytecount = not not lxp.new({}).getcurrentbytecount; -local default_stanza_size_limit = 1024*1024*10; -- 10MB +local default_stanza_size_limit = 1024*1024*1; -- 1MB local _ENV = nil; -- luacheck: std none @@ -194,6 +194,9 @@ stanza = t_remove(stack); end else + if lxp_supports_bytecount then + cb_handleprogress(stanza_size); + end if cb_streamclosed then cb_streamclosed(session); end @@ -295,6 +298,9 @@ return ok, err; end, set_session = meta.set_session; + set_stanza_size_limit = function (_, new_stanza_size_limit) + stanza_size_limit = new_stanza_size_limit; + end; }; end
