mirror of
https://github.com/rclone/rclone.git
synced 2026-09-22 05:45:55 -04:00
fixup! operations: fix hang when deleting files and a fatal error occurs
x
This commit is contained in:
1 parent
b40d72332b
commit
9dc8422a22
1 file changed
+2
-4
@@ -607,11 +607,9 @@ func DeleteFilesWithBackupDir(ctx context.Context, toBeDeleted fs.ObjectsChan, b
|
||||
for range ci.Checkers {
|
||||
go func() {
|
||||
defer wg.Done()
|
||||
// Every object must be received, even after a fatal error,
|
||||
// otherwise the sender blocks when the channel fills up
|
||||
for dst := range toBeDeleted {
|
||||
// Empty the channel on fatal error
|
||||
if fatalErrorCount.Load() != 0 {
|
||||
continue
|
||||
}
|
||||
err := DeleteFileWithBackupDir(ctx, dst, backupDir)
|
||||
if err != nil {
|
||||
errorCount.Add(1)
|
||||
|
||||
Reference in new issue
Block a user