Fix streaming buffer size (#10240)
* Fix send buffer size * Fix formatting
Vladimir Kobal committed
Nov 16, 2020 at 21:26 UTC
fc555025b40e27f088106f7093fdc799426e292a
2 files changed
+8
-5
streaming/rrdpush.h
-1
@@ -43,7 +43,6 @@ struct sender_state {
43
pid_t task_id;
44
unsigned int overflow:1;
45
int timeout, default_port;
46
- size_t max_size;
46
usec_t reconnect_delay;
47
char connected_to[CONNECTED_TO_SIZE + 1]; // We don't know which proxy we connect to, passed back from socket.c
48
size_t begin;
streaming/sender.c
+8
-4
@@ -584,10 +584,14 @@ void *rrdpush_sender_thread(void *ptr) {
584
585
s->timeout = (int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "timeout seconds", 60);
586
s->default_port = (int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "default port", 19999);
587
- s->max_size = (size_t)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "buffer size bytes",
588
- 1024 * 1024);
589
- s->reconnect_delay = (unsigned int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "reconnect delay seconds", 5);
590
- 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
587
+ s->buffer->max_size =
588
+ (size_t)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "buffer size bytes", 1024 * 1024);
589
+ s->reconnect_delay =
590
+ (unsigned int)appconfig_get_number(&stream_config, CONFIG_SECTION_STREAM, "reconnect delay seconds", 5);
591
+ remote_clock_resync_iterations = (unsigned int)appconfig_get_number(
592
+ &stream_config, CONFIG_SECTION_STREAM,
593
+ "initial clock resync iterations",
594
+ remote_clock_resync_iterations); // TODO: REMOVE FOR SLEW / GAPFILLING
595
596
// initialize rrdpush globals
597
s->host->rrdpush_sender_connected = 0;