Use a WaitGroup to wait for both export and import goroutine to finish

This commit is contained in:
Philipp Wolfer 2025-05-05 17:49:44 +02:00
parent 17cee9cb8b
commit a87c42059f
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
4 changed files with 26 additions and 14 deletions

View file

@ -60,8 +60,7 @@ func setupProgressBars(updateChan chan models.TransferProgress) progressBarUpdat
return u
}
func (u *progressBarUpdater) wait() {
// FIXME: This should probably be closed elsewhere
func (u *progressBarUpdater) close() {
close(u.updateChan)
u.progress.Wait()
}