Skip to content

Enforce with_max_clients at http handler - #249

Merged
lxsaah merged 1 commit into
aimdb-dev:mainfrom
solus161:feat/fix_with_max_clients_216
Sep 4, 2026
Merged

Enforce with_max_clients at http handler#249
lxsaah merged 1 commit into
aimdb-dev:mainfrom
solus161:feat/fix_with_max_clients_216

Conversation

@solus161

@solus161 solus161 commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

What's new:

  • Enforces with_max_client at http handler level by introducing try_connection_guard which implements a Compare And Swap on the atomic connection counter;
  • Updates WsDispatch and WsSession as they can no longer hold a conn_guard generated externally given current signagure;
  • Adds with_max_subs_per_connection to WebSocketConnectorBuilder which is now the real cap on subs per connection;
  • Adds test cases for the with_max_client cap featuring two scenarios: 1) clients sequentially connect; 2) clients concurrently connect

Related Issue

Checklist

  • I have read the CONTRIBUTING.md document.
  • My code follows the project's coding standards.
  • I have added tests to cover my changes.
  • All new and existing tests passed (make check).
  • I have updated the documentation accordingly.

What's new:
- Enforces `with_max_client` at http handler level by introducing
`try_connection_guard` which implements a Compare And Swap on the atomic
connection counter;
- Updates `WsDispatch` and `WsSession` as they can no longer hold a
`conn_guard` generated externally given current signagure;
- Adds `with_max_subs_per_connection` to `WebSocketConnectorBuilder`
which is now the real cap on subs per connection;
- Adds test cases for the `with_max_client` cap featuring two scenarios:
1) clients sequentially connect; 2) clients concurrently connect
@solus161
solus161 requested a review from lxsaah as a code owner September 4, 2026 07:37
@lxsaah

lxsaah commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Lgtm. Thanks @solus161

@lxsaah
lxsaah merged commit 941255a into aimdb-dev:main Sep 4, 2026
7 checks passed
@solus161
solus161 deleted the feat/fix_with_max_clients_216 branch September 4, 2026 23:03
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.

[BUG] with_max_clients bounds subscriptions per connection, not the client count

2 participants