Software /
code /
prosody
Comparison
plugins/mod_csi_simple.lua @ 10827:d8e83d94a99a
mod_csi_simple: Reset queue counter to zero when enabling
For symmetry.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 09 May 2020 17:07:43 +0200 |
parent | 10826:4f7226d5ee30 |
child | 10828:c12ed21f877e |
comparison
equal
deleted
inserted
replaced
10826:4f7226d5ee30 | 10827:d8e83d94a99a |
---|---|
122 end | 122 end |
123 | 123 |
124 function enable_optimizations(session) | 124 function enable_optimizations(session) |
125 if session.conn and session.conn.pause_writes then | 125 if session.conn and session.conn.pause_writes then |
126 session.conn:pause_writes(); | 126 session.conn:pause_writes(); |
127 session.csi_counter = 0; | |
127 filters.add_filter(session, "stanzas/out", manage_buffer); | 128 filters.add_filter(session, "stanzas/out", manage_buffer); |
128 filters.add_filter(session, "bytes/in", flush_buffer); | 129 filters.add_filter(session, "bytes/in", flush_buffer); |
129 else | 130 else |
130 session.log("warn", "Session connection does not support write pausing"); | 131 session.log("warn", "Session connection does not support write pausing"); |
131 end | 132 end |