Task.Delay(Timeout.Infinite) task is never cancelled — minor resource leak
Source: Code review (automated)
Date: 2026-09-02
Scope: Recent changes (Manual Selection rip mode, PR #144)
File(s): src/ArmRipper.Core/Rip/ArmRipperService.cs
Problem
When the TCS completes (user clicks Continue), Task.WhenAny returns but the Task.Delay(Timeout.Infinite, linkedCts.Token) task is never awaited or cancelled. Disposing linkedCts does not cancel the token, so the delay task remains pending for the process lifetime. Each manual selection leaves one orphaned pending task.
Proposed Fix
Cancel the delay explicitly (e.g. linkedCts.Cancel() in the finally, or use a CancellationTokenSource that is cancelled after WhenAny).
Notes
Minor resource leak; low impact but easy to fix.
Task.Delay(Timeout.Infinite) task is never cancelled — minor resource leak
Source: Code review (automated)
Date: 2026-09-02
Scope: Recent changes (Manual Selection rip mode, PR #144)
File(s):
src/ArmRipper.Core/Rip/ArmRipperService.csProblem
When the TCS completes (user clicks Continue),
Task.WhenAnyreturns but theTask.Delay(Timeout.Infinite, linkedCts.Token)task is never awaited or cancelled. DisposinglinkedCtsdoes not cancel the token, so the delay task remains pending for the process lifetime. Each manual selection leaves one orphaned pending task.Proposed Fix
Cancel the delay explicitly (e.g.
linkedCts.Cancel()in thefinally, or use aCancellationTokenSourcethat is cancelled afterWhenAny).Notes
Minor resource leak; low impact but easy to fix.