Skip to content

fix: disconnect clients when a media session is removed - #18

Open
AJ0070 wants to merge 1 commit into
ZoneMinder:masterfrom
AJ0070:fix-remove-session-disconnect
Open

AJ0070 wants to merge 1 commit into
ZoneMinder:masterfrom
AJ0070:fix-remove-session-disconnect

Conversation

@AJ0070

@AJ0070 AJ0070 commented Nov 17, 2026

Copy link
Copy Markdown

RemoveSession() dropped the session from the maps but left its clients connected. When zm_rtsp_server removes a monitor's session (zmc restart, monitor reload), clients of that session stay connected and receive nothing, so players hang instead of reconnecting.

RemoveSession() now disconnects the RTSP connection of each client of the removed session, outside the server lock.

Tested from ZoneMinder with a test that adds a session, connects a client, removes the session and checks the client socket gets closed. It fails without this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant