Skip to content

sdk(local_relay): add LocalRelay::connections_left - #1459

Open
TheAwiteb wants to merge 1 commit into
nostrdevkit:masterfrom
TheAwiteb:expose-remaining-connections
Open

sdk(local_relay): add LocalRelay::connections_left#1459
TheAwiteb wants to merge 1 commit into
nostrdevkit:masterfrom
TheAwiteb:expose-remaining-connections

Conversation

@TheAwiteb

Copy link
Copy Markdown
Member

Returns the number of remaining connections the relay can handle.

Useful for relays that use LocalRelay::take_connection with an already upgraded connection, avoiding CPU waste on connections that would be rejected due to capacity limits.

Refs #1458

Checklist

  • I followed the contribution guidelines
  • I updated the relevant CHANGELOG.md (if applicable)
  • I understand and can explain all code in this PR

Returns the number of remaining connections the relay can handle.

Useful for relays that use `LocalRelay::take_connection` with an already
upgraded connection, avoiding CPU waste on connections that would be
rejected due to capacity limits.

Refs nostrdevkit#1458

Signed-off-by: Awiteb <a@4rs.nl>
@TheAwiteb
TheAwiteb requested a review from yukibtc as a code owner August 21, 2026 21:08
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
nostr-sdk/src/local_relay/local/mod.rs 0.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

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