Software /
code /
prosody
Comparison
plugins/mod_csi_simple.lua @ 10808:0d365c0ee9fe
mod_csi_simple: Log reasons for not flushing
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 07 May 2020 23:02:47 +0200 |
parent | 10807:b92afa0a4119 |
child | 10817:7c503938ce1d |
comparison
equal
deleted
inserted
replaced
10807:b92afa0a4119 | 10808:0d365c0ee9fe |
---|---|
102 local flush, why = should_flush(stanza, session, ctr); | 102 local flush, why = should_flush(stanza, session, ctr); |
103 if flush then | 103 if flush then |
104 session.log("debug", "Flushing buffer (%s; queue size is %d)", why or "important", session.csi_counter); | 104 session.log("debug", "Flushing buffer (%s; queue size is %d)", why or "important", session.csi_counter); |
105 session.conn:resume_writes(); | 105 session.conn:resume_writes(); |
106 else | 106 else |
107 session.log("debug", "Holding buffer (%s; queue size is %d)", why or "unimportant", session.csi_counter); | |
107 stanza = with_timestamp(stanza, jid.join(session.username, session.host)) | 108 stanza = with_timestamp(stanza, jid.join(session.username, session.host)) |
108 end | 109 end |
109 session.csi_counter = ctr + 1; | 110 session.csi_counter = ctr + 1; |
110 return stanza; | 111 return stanza; |
111 end | 112 end |