Fix channel worker stalling when stopping ffmpeg with unread stdout
CI / test (push) Successful in 53s
CI / build (amd64) (push) Successful in 2m17s
CI / build (arm64) (push) Successful in 10m39s
CI / manifest (push) Successful in 8s

This commit is contained in:
2026-10-09 08:38:12 +02:00
parent 21176d7f64
commit fc4ed4fc47
3 changed files with 34 additions and 1 deletions
+4
View File
@@ -20,6 +20,10 @@ All notable changes to this project are documented in this file.
### Fixed
- Stopping ffmpeg (on every proactive URL refresh) no longer stalls. The worker stops reading ffmpeg's stdout when it
breaks out to refresh, and asyncio's `Process.wait()` does not return until every pipe reaches EOF, so `stop()` always
ran into the terminate timeout ("did not exit in time, killing it") and could leave a channel worker stuck for good,
silently ending that channel's stream. `stop()` now drains the leftover stdout while waiting for ffmpeg to exit.
- `/stream/{channel_id}` now forces the connection closed after each response (`Connection: close`) instead of
allowing keep-alive. Jellyfin's M3U tuner client (`SharedHttpStream`) was reusing a pooled keep-alive connection
still mid-stream from an earlier request and reading raw MPEG-TS bytes as if they were a fresh HTTP response,