@cryptotaxi247 / netdata-1 / commits / 80a6cd2b8

Adjust stream connector timeout during agent shutdown (#20434)

Modified the job wait timeout to be shorter (250ms) when exiting the loop, improving responsiveness during shutdown.

Stelios Fragkakis committed Jun 6, 2025 at 19:27 UTC 80a6cd2b83d8fb3060883c8d65d4d570f141ec78
1 file changed +1 -1
src/streaming/stream-connector.c
+1 -1
@@ -534,7 +534,7 @@ static void *stream_connector_thread(void *ptr) {
534 size_t exiting = 0;
535 while(exiting <= 5) {
536 worker_is_idle();
537 - job_id = completion_wait_for_a_job_with_timeout(&sc->completion, job_id, 1000);
537 + job_id = completion_wait_for_a_job_with_timeout(&sc->completion, job_id, exiting ? 250 : 1000);
538 size_t nodes = 0, connected_nodes = 0, failed_nodes = 0, cancelled_nodes = 0;
539
540 if(!service_running(SERVICE_STREAMING_CONNECTOR))