Software /
code /
prosody
Annotate
teal-src/util/human/units.d.tl @ 12056:e62025f949f9
mod_smacks: Limit queue memory consumption using new util
This brings back the queue size limit that was once added, then removed
because destroying the session when reaching the limit was not great.
Instead, the queue wraps and overwrites the oldest unacked stanza on the
assumption that it will probably be acked anyway and thus does not need
to be delivered. If those discarded stanzas turn out to be needed on
resumption then the resumption fails.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 14 Dec 2021 20:00:45 +0100 |
parent | 11432:113f3912c7cb |
child | 12608:946a11f794e2 |
rev | line source |
---|---|
11432
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
1 local lib = record |
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 adjust : function (number, string) : number, string |
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 format : function (number, string, string) : string |
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
4 end |
113f3912c7cb
util: Add Teal interface definition files
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
5 return lib |