What's Changed
A hardening release: three verified runtime defects on the shutdown and polling paths, plus several correctness fixes in the download manager.
Bug Fixes
- Exit cleanly on SIGTERM —
http.ErrServerClosedwas treated as fatal, so every graceful shutdown logged an error and exited 1, which Docker and systemd read as a crash - Fix a data race between the transfer monitor and
torrent-gethandlers that could crash the process on a concurrent map access - Fix a
send on closed channelpanic when a transfer was queued while the manager was shutting down - Fix a shutdown deadlock when the download queue was full
- Retry transfers whose local download failed — a single permanent file failure previously stranded the transfer forever: never retried, put.io source never cleaned up, never reported complete to *arr
- Stop double-counting bytes across download retries, which could report progress above 100%
- Mark transfers that report no files as failed instead of re-examining them on every poll forever
Improvements
- Apply idle and response-header timeouts to downloads, and abandon stalled ones — previously a server that accepted a connection and went quiet pinned a worker until the process exited
- Drop per-transfer tracking on
torrent-removeso it no longer grows for the lifetime of the process - Regenerate
gomod2nix.toml, which had drifted fromgo.mod(zerolog v1.34.0 vs v1.35.1), so released binaries now match what tests run against - Remove dead code and check previously-ignored errors;
golangci-lintis clean
Full Changelog: v0.11.0...v0.11.1