diff --git a/.golangci.yaml b/.golangci.yaml index 04e974f..b3a7e24 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -24,7 +24,6 @@ linters: - goconst - gocritic - gofmt - - gomnd - gosec - misspell - nilerr diff --git a/background.go b/background.go index 25dcee2..01f19c6 100644 --- a/background.go +++ b/background.go @@ -98,12 +98,11 @@ func (m *Manager) Cancel() { // Close is a convenience method that calls Wait() and Cancel() in parallel. It blocks until all tasks have finished. func (m *Manager) Close() { var wg sync.WaitGroup - wg.Add(1) + wg.Add(2) go func() { m.Wait() wg.Done() }() - wg.Add(1) go func() { m.Cancel() wg.Done()