From c0a6260c1f8fa473858ce4d1e6d8f17daab36de4 Mon Sep 17 00:00:00 2001 From: Rafael RL Date: Fri, 22 Nov 2024 11:56:51 +0100 Subject: [PATCH] Buffer size --- src/measure.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/measure.rs b/src/measure.rs index f0b63b2..1efbe9d 100644 --- a/src/measure.rs +++ b/src/measure.rs @@ -72,7 +72,7 @@ pub struct MeasurementConfig { pub skip_seconds: Option, pub api: Api, pub detailed_output: bool, - pub buffer_size: u32, + pub buffer_size: Option, } pub struct MeasurementContext { @@ -109,7 +109,7 @@ async fn create_subscriber( signals: Vec, api: &Api, initial_values_sender: Sender>, - buffer_size: u32, + buffer_size: Option, ) -> Result { let subscriber_channel = endpoint.connect().await.with_context(|| { let host = endpoint.uri().host().unwrap_or("unknown host"); @@ -125,7 +125,7 @@ async fn create_subscriber( subscriber_channel, signals, initial_values_sender, - buffer_size, + buffer_size.unwrap_or(10), ) .await .unwrap();