Skip to content

fix(web): disconnect only the disabled client instead of all sessions#5138

Open
neatnoise wants to merge 1 commit into
LizardByte:masterfrom
neatnoise:fix/disconnect-only-disabled-client
Open

fix(web): disconnect only the disabled client instead of all sessions#5138
neatnoise wants to merge 1 commit into
LizardByte:masterfrom
neatnoise:fix/disconnect-only-disabled-client

Conversation

@neatnoise
Copy link
Copy Markdown
Contributor

Description

When disabling a client via the web UI, all active streaming sessions were terminated. This change makes it so only the disabled client's session is disconnected, leaving other clients unaffected.

The client's TLS certificate (already stored in named_cert_t) is used to identify which session belongs to the disabled client. The cert is propagated from the TLS verify callback through launch_session_t into session_t, enabling per-client session termination.

Issues Fixed or Closed

Roadmap Issues

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@ReenigneArcher ReenigneArcher force-pushed the fix/disconnect-only-disabled-client branch from 817ab69 to 1085d4c Compare May 17, 2026 14:07
@neatnoise neatnoise force-pushed the fix/disconnect-only-disabled-client branch from 1085d4c to d48f044 Compare May 17, 2026 14:21
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2026

Bundle Report

Bundle size has no change ✅

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
3 New issues
3 New Code Smells (required ≤ 0)
B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@neatnoise
Copy link
Copy Markdown
Contributor Author

neatnoise commented May 17, 2026

Quality Gate Failed Quality Gate failed

Failed conditions 3 New issues 3 New Code Smells (required ≤ 0) B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Scanning comments:
The std::lock_guard complaint is about _session_slots.lock() which returns a std::lock_guard — that's the sync_util::sync_t API used everywhere in the codebase. We can't change it without changing the utility class itself.

The std::erase_if complaint — we can't use it because we need to call stop() and join() on each element before erasing. erase_if only takes a predicate, it doesn't support side effects before removal.

The rtsp.h struct with 21 fields is a 6-year-old pre-existing issue (we added 1 field: client_cert).

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