diff options
author | Vladimir Kobal <vlad@prokk.net> | 2020-11-16 21:26:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-16 21:26:38 +0200 |
commit | fc555025b40e27f088106f7093fdc799426e292a (patch) | |
tree | a76604e7fbfa2c783a9f96c3ead5f8a2e925cc7a /streaming | |
parent | f6ee3cc628717de20da6353fa34dca4f1b8267ca (diff) |
Fix streaming buffer size (#10240)
* Fix send buffer size
* Fix formatting
Diffstat (limited to 'streaming')
-rw-r--r-- | streaming/rrdpush.h | 1 | ||||
-rw-r--r-- | streaming/sender.c | 12 |
2 files changed, 8 insertions, 5 deletions
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; |