aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_admin_shell.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-12-14 20:00:45 +0100
committerKim Alvefur <zash@zash.se>2021-12-14 20:00:45 +0100
commit6e0bbc2af5f1213df15e988ea176c7f398c9fdf3 (patch)
tree4ab2c6874868cf59650074de35b3ccbd87aa0c57 /plugins/mod_admin_shell.lua
parent93a9ed262065d9966643ad5ae50b58142a1c6823 (diff)
downloadprosody-6e0bbc2af5f1213df15e988ea176c7f398c9fdf3.tar.gz
prosody-6e0bbc2af5f1213df15e988ea176c7f398c9fdf3.zip
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.
Diffstat (limited to 'plugins/mod_admin_shell.lua')
-rw-r--r--plugins/mod_admin_shell.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index 4ee39289..71597ee9 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -815,7 +815,7 @@ local available_columns = {
width = 8;
align = "right";
mapper = function (queue)
- return queue and tostring(#queue);
+ return queue and tostring(queue:count_unacked());
end
};
csi = {