# HG changeset patch # User Kim Alvefur <zash@zash.se> # Date 1731247560 -3600 # Node ID 42b98ee73ca8ffbd635b86ac2d0c53feedeee3d5 # Parent 902d25cd05578aaea97645d87d4f634f83729e06 mod_s2s: Fix counting items in outgoing stanza queue (in logs) diff -r 902d25cd0557 -r 42b98ee73ca8 plugins/mod_s2s.lua --- a/plugins/mod_s2s.lua Sat Nov 09 16:47:14 2024 +0100 +++ b/plugins/mod_s2s.lua Sun Nov 10 15:06:00 2024 +0100 @@ -135,7 +135,7 @@ local function bounce_sendq(session, reason) local sendq = session.sendq; if not sendq then return; end - session.log("info", "Sending error replies for %d queued stanzas because of failed outgoing connection to %s", #sendq, session.to_host); + session.log("info", "Sending error replies for %d queued stanzas because of failed outgoing connection to %s", sendq.items(), session.to_host); local dummy = { type = "s2sin"; send = function () @@ -366,7 +366,7 @@ if session.direction == "outgoing" then if sendq then - session.log("debug", "sending %d queued stanzas across new outgoing connection to %s", #sendq, session.to_host); + session.log("debug", "sending %d queued stanzas across new outgoing connection to %s", sendq.items(), session.to_host); local send = session.sends2s; for stanza in sendq:consume() do -- TODO check send success