@cryptotaxi247 / netdata-1 / commits / 5bea95c20

Improve streaming (#21992)

thiagoftsm committed Mar 20, 2026 at 19:58 UTC 5bea95c204461c1be59bb2a09b000c7f3f9a9c8a
1 file changed +1 -6
src/daemon/daemon-service.c
+1 -6
@@ -169,13 +169,9 @@ bool service_wait_exit(SERVICE_TYPE service, usec_t timeout_ut) {
169
170 // signal them to stop
171 size_t last_running = 0;
172 - size_t stale_time_ut = 0;
172 usec_t sleep_ut = 50 * USEC_PER_MS;
173 size_t log_countdown_ut = sleep_ut;
174 do {
176 - if(running != last_running)
177 - stale_time_ut = 0;
178 -
175 last_running = running;
176 running = 0;
177 running_services = 0;
@@ -214,11 +210,10 @@ bool service_wait_exit(SERVICE_TYPE service, usec_t timeout_ut) {
210 }
211
212 sleep_usec(sleep_ut);
217 - stale_time_ut += sleep_ut;
213 }
214
215 ended_ut = now_monotonic_usec();
221 - } while(running && (ended_ut - started_ut < timeout_ut || stale_time_ut < timeout_ut));
216 + } while(running && ((ended_ut - started_ut) < timeout_ut));
217
218 if(running) {
219 buffer_flush(service_list);