Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
diag: thread-safety step4 - remove dedicated shutdown listener gorout…
…ine (#11137) reason: - we already have 1 goroutine for saving data: ``` func (d *DiagnosticClient) runSaveProcess(rootCtx context.Context) { ticker := time.NewTicker(5 * time.Minute) go func() { for { select { case <-ticker.C: d.SaveData() case <-rootCtx.Done(): ticker.Stop() return } } }() } ``` no reason to save it from one more goroutine. just save it right here - in `case <-rootCtx.Done()` section. less concurrency - better. rootContext already subscribed to sigterm
- Loading branch information