fix: keep UpdateCheckWorker alive until its thread finishes (#32) #42
Reference in New Issue
Block a user
Delete Branch "fix/32-about-worker-lifetime"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #32.
Closing the About dialog while a "Check for updates" request was in flight GC'd the dialog and the running QThread, aborting with
QThread: Destroyed while thread is still running. Reproduced on unpatched main with an offscreen QApplication and a slowedfetch_latest_release; the same script passes with this fix (keepalive verified released after the thread finishes).Fix: a class-level
_liveset holds everyUpdateCheckWorkeruntil itsfinishedsignal fires. Callers may drop their reference at any time; a result delivered to a destroyed receiver is silently discarded by Qt. Covers both the About dialog and the silent startup check with zero call-site changes.Tests + ruff clean.
🤖 Generated with Claude Code