[PR #9944] Close streams with no sessions on playback and session events #12283

Open
opened 2026-02-07 06:53:10 +03:00 by OVERLORD · 0 comments
Owner

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

**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
OVERLORD added the pull-request label 2026-02-07 06:53:10 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#12283