Skip to content

sdk(local_relay): InnerLocalRelay::handle_connection take conn permit before handshake - #1458

Open
TheAwiteb wants to merge 1 commit into
nostrdevkit:masterfrom
TheAwiteb:local-relay-run-take-conn-permit-first
Open

TheAwiteb wants to merge 1 commit into
nostrdevkit:masterfrom
TheAwiteb:local-relay-run-take-conn-permit-first

Conversation

@TheAwiteb

Copy link
Copy Markdown
Member

I don't really think any relay use handle_connection, as I know all of them use handle_upgraded_connection, which take an already upgraded connection. But just in case a prodaction realy used it.

Checklist

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

…it before handshake

I don't really think any relay use `handle_connection`, as I know all
of them use `handle_upgraded_connection`, which take an already upgraded
connection. But just in case a prodaction realy used it.

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

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

TheAwiteb added a commit to TheAwiteb/nostr that referenced this pull request Aug 21, 2026
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>
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