From 9aaf6cd8ab13b85573d17eb37275fb29e912f7ee Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Thu, 21 Dec 2017 22:48:53 -0500 Subject: [PATCH] adds check that buffer_size > 0 to allow 0-size buffer, flush every message setting --- src/influx.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/influx.rs b/src/influx.rs index f095bfb..8624db6 100644 --- a/src/influx.rs +++ b/src/influx.rs @@ -232,7 +232,7 @@ impl InfluxWriter { "buf.len()" => buf.len()); match prev { - 0 => { + 0 if buffer_size > 0 => { buf.push_str(s); 1 }