Diff

plugins/mod_csi_simple.lua @ 10825:2d002a4af144

mod_csi_simple: Fix flushing when client sent something Forgot to unset the flag afterwards, so it would only work once. The flag is not even needed, it works as intended without it.
author Kim Alvefur <zash@zash.se>
date Sat, 09 May 2020 13:50:58 +0200
parent 10824:c8430ee33967
child 10826:4f7226d5ee30
line wrap: on
line diff
--- a/plugins/mod_csi_simple.lua	Sat May 09 13:33:26 2020 +0200
+++ b/plugins/mod_csi_simple.lua	Sat May 09 13:50:58 2020 +0200
@@ -116,10 +116,6 @@
 end
 
 local function flush_buffer(data, session)
-	if session.csi_flushing then
-		return data;
-	end
-	session.csi_flushing = true;
 	session.log("debug", "Client sent something, flushing buffer once (queue size is %d)", session.csi_counter);
 	session.conn:resume_writes();
 	return data;
@@ -136,7 +132,6 @@
 end
 
 function disable_optimizations(session)
-	session.csi_flushing = nil;
 	filters.remove_filter(session, "stanzas/out", manage_buffer);
 	filters.remove_filter(session, "bytes/in", flush_buffer);
 	if session.conn and session.conn.resume_writes then