Mercurial > prosody-hg
comparison plugins/mod_smacks.lua @ 12524:dd5ab9a6b599
mod_smacks: Remove debug log references to timer (not used anymore)
Cuts down on noise as well
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 26 May 2022 19:24:01 +0200 |
| parents | d2177cb5a766 |
| children | 923d6fe5ee41 |
comparison
equal
deleted
inserted
replaced
| 12523:d2177cb5a766 | 12524:dd5ab9a6b599 |
|---|---|
| 171 return queue:count_unacked() > max_unacked and expected_h ~= session.last_requested_h; | 171 return queue:count_unacked() > max_unacked and expected_h ~= session.last_requested_h; |
| 172 end | 172 end |
| 173 | 173 |
| 174 local function request_ack(session, reason) | 174 local function request_ack(session, reason) |
| 175 local queue = session.outgoing_stanza_queue; | 175 local queue = session.outgoing_stanza_queue; |
| 176 session.log("debug", "Sending <r> (inside timer, before send) from %s - #queue=%d", reason, queue:count_unacked()); | 176 session.log("debug", "Sending <r> from %s - #queue=%d", reason, queue:count_unacked()); |
| 177 (session.sends2s or session.send)(st.stanza("r", { xmlns = session.smacks })) | 177 (session.sends2s or session.send)(st.stanza("r", { xmlns = session.smacks })) |
| 178 if session.destroyed then return end -- sending something can trigger destruction | 178 if session.destroyed then return end -- sending something can trigger destruction |
| 179 session.awaiting_ack = true; | 179 session.awaiting_ack = true; |
| 180 -- expected_h could be lower than this expression e.g. more stanzas added to the queue meanwhile) | 180 -- expected_h could be lower than this expression e.g. more stanzas added to the queue meanwhile) |
| 181 session.last_requested_h = queue:count_acked() + queue:count_unacked(); | 181 session.last_requested_h = queue:count_acked() + queue:count_unacked(); |
| 182 session.log("debug", "Sending <r> (inside timer, after send) from %s - #queue=%d", reason, queue:count_unacked()); | |
| 183 if not session.delayed_ack_timer then | 182 if not session.delayed_ack_timer then |
| 184 session.delayed_ack_timer = timer.add_task(delayed_ack_timeout, function() | 183 session.delayed_ack_timer = timer.add_task(delayed_ack_timeout, function() |
| 185 ack_delayed(session, nil); -- we don't know if this is the only new stanza in the queue | 184 ack_delayed(session, nil); -- we don't know if this is the only new stanza in the queue |
| 186 end); | 185 end); |
| 187 end | 186 end |
