Fix channel worker stalling when stopping ffmpeg with unread stdout
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user