Skip to content

Commit

Permalink
fix forgot to send done signal when download failed
Browse files Browse the repository at this point in the history
  • Loading branch information
zyxkad committed Jun 9, 2024
1 parent c29dd31 commit 337358c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,10 @@ func (cr *Cluster) syncFiles(ctx context.Context, files []FileInfo, heavyCheck b
case path := <-pathRes:
cr.syncProg.Add(1)
if path == "" {
select {
case done <- nil: // TODO: or all storage?
case <-ctx.Done():
}
return
}
defer os.Remove(path)
Expand Down

0 comments on commit 337358c

Please sign in to comment.