From fc555025b40e27f088106f7093fdc799426e292a Mon Sep 17 00:00:00 2001 From: Vladimir Kobal Date: Mon, 16 Nov 2020 21:26:38 +0200 Subject: Fix streaming buffer size (#10240) * Fix send buffer size * Fix formatting --- streaming/rrdpush.h | 1 - streaming/sender.c | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'streaming') diff --git a/streaming/rrdpush.h b/streaming/rrdpush.h index 39ffed1c3b..225d0c2992 100644 --- a/streaming/rrdpush.h +++ b/streaming/rrdpush.h @@ -43,7 +43,6 @@ struct sender_state { pid_t task_id; unsigned int overflow:1; int timeout, default_port; - size_t max_size; usec_t reconnect_delay; char connected_to[CONNECTED_TO_SIZE + 1]; // We don't know which proxy we connect to, passed back from socket.c size_t begin; diff --git a/streaming/sender.c b/streaming/sender.c index 96a2e6c6f1..a6191b0a84 100644 --- a/streaming/sender.c +++ b/streaming/sender.c @@ -584,10 +584,14 @@ void *rrdpush_sender_thread(void *ptr) { s->timeout = (int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "timeout seconds", 60); s->default_port = (int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "default port", 19999); - s->max_size = (size_t)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "buffer size bytes", - 1024 * 1024); - s->reconnect_delay = (unsigned int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "reconnect delay seconds", 5); - remote_clock_resync_iterations = (unsigned int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "initial clock resync iterations", remote_clock_resync_iterations); // TODO: REMOVE FOR SLEW / GAPFILLING + s->buffer->max_size = + (size_t)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "buffer size bytes", 1024 * 1024); + s->reconnect_delay = + (unsigned int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "reconnect delay seconds", 5); + remote_clock_resync_iterations = (unsigned int)appconfig_get_number( + &stream_config, CONFIG_SECTION_STREAM, + "initial clock resync iterations", + remote_clock_resync_iterations); // TODO: REMOVE FOR SLEW / GAPFILLING // initialize rrdpush globals s->host->rrdpush_sender_connected = 0; -- cgit v1.2.3