Skip to content

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

Merged
yukibtc merged 1 commit into
nostrdevkit:masterfrom
TheAwiteb:expose-remaining-connections
Sep 19, 2026
Merged

yukibtc merged 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

@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!

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

Pull-Request: nostrdevkit#1459
Signed-off-by: Awiteb <a@4rs.nl>
@yukibtc
yukibtc force-pushed the expose-remaining-connections branch from 2cf28ab to e62e2ab Compare September 19, 2026 07:03
@yukibtc
yukibtc merged commit e62e2ab into nostrdevkit:master Sep 19, 2026
42 checks passed
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.

2 participants