mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 00:25:43 +00:00
- Give every Start its own run context, WaitGroup (including the queue producer), supervisor done channel and snapshots of the plan, request headers, HTTP client and merge target; Pause/Close wait for all run goroutines, including a merge in flight, before returning - Build the HTTP client in Resolve/Start before workers launch instead of lazily inside do(), which raced between concurrent segment downloads - Reject task edits while a run is active instead of mutating shared state - Reset counters per run and seed them from the completed-segment journal; count only stored output bytes as progress, never discarded retry bytes - Report Res.Size only when every segment is unencrypted with a known length; ciphertext sums overstate the final output, indeterminate plans rely on the engine's TotalDownloaded backfill at completion