Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

End Duplicates' progress stream however a scan ends

Țugui Dragoș046bdefa8da3
diff --git a/Peel/Model/DuplicateLibrary.swift b/Peel/Model/DuplicateLibrary.swift
index 33b22a3f..2a342fb3 100644
--- a/Peel/Model/DuplicateLibrary.swift
+++ b/Peel/Model/DuplicateLibrary.swift
@@ -178,6 +178,8 @@ final class DuplicateLibrary {
of: DuplicateScanProgress.self,
bufferingPolicy: .bufferingNewest(1)
)
+ // Whichever way this ends: a stream never finished keeps the task reading it suspended for good.
+ defer { continuation.finish() }
let progressUpdates = Task {
for await update in updates {
// A scan stopped or replaced reports on until it notices, over the newer scan's progress otherwise.