Avoid double closing of export progress channel

This commit is contained in:
Philipp Wolfer 2023-11-23 22:45:31 +01:00
parent e8fdfb95a6
commit fb285930c0
No known key found for this signature in database
GPG key ID: 8FDF744D4919943B
9 changed files with 2 additions and 11 deletions

View file

@ -89,7 +89,6 @@ func (b *SpotifyApiBackend) ExportListens(oldestTimestamp time.Time, results cha
totalDuration := startTime.Sub(oldestTimestamp)
defer close(results)
defer close(progress)
p := models.Progress{Total: int64(totalDuration.Seconds())}
@ -153,7 +152,6 @@ func (b *SpotifyApiBackend) ExportLoves(oldestTimestamp time.Time, results chan
perPage := MaxItemsPerGet
defer close(results)
defer close(progress)
p := models.Progress{Total: int64(perPage)}
var totalCount int