mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #9944] Close streams with no sessions on playback and session events #12283
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Original Pull Request: https://github.com/jellyfin/jellyfin/pull/9944
State: open
Merged: No
Some of the Jellyfin clients (such as Android Mobile) do not seem to unsubscribe from Live Streams after they are closed. This can result in streams remaining open on the server indefinitely, which causes issues with M3UTuners that have a fixed number of active streams allowed. The server should be responsible for cleaning up after any irresponsible clients, or connection failures in this case.
Changes
Adds a new function to SessionManager to close any streams that are not currently "claimed" by a session. Adds behavior to trigger this cleanup on events that would require it such as playback stopping or sessions ending. Also allows the cleanup to be toggled for the case of Live TV Recording, which does not need to be cleaned up.
Issues
Fixes #9690