mirror of
https://github.com/restic/restic.git
synced 2026-05-21 17:45:23 +00:00
5607fd759f
wg.Go() may not be called after wg.Wait(). This prevents connecting two errgroups such that the errors are propagated between them if the child errgroup dynamically starts goroutines. Instead use just a single errgroup, and sequence the shutdown using a sync.WaitGroup. This is far simpler and does not require any "clever" tricks.