Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(iroh-relay): cleanup client connections in all cases #3105

Merged
merged 2 commits into from
Jan 8, 2025

Conversation

dignifiedquire
Copy link
Contributor

Description

Bring back connection_ids and ensure that client connections remove themselves from the clients list when they are done.

Before, as pointed out in #3103 connections would not be cleaned up if no messages were sent to them anymore.

Based on #3103

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.

Bring back `connection_id`s and ensure that client connections remove themselves from the clients list when they are done.

Before, as pointed out in #3103 connections would not be cleaned up if no messages were sent to them anymore.

Based on #3103
Copy link

github-actions bot commented Jan 8, 2025

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3105/docs/iroh/

Last updated: 2025-01-08T10:41:15Z

Comment on lines 73 to 74
/// Explicitly drops the reference to the client to avoid deadlock.
async fn unregister<'a>(
&self,
client: dashmap::mapref::one::Ref<'a, iroh_base::PublicKey, Client>,
node_id: NodeId,
) {
drop(client); // avoid deadlock
pub(super) async fn unregister<'a>(&self, connection_id: u64, node_id: NodeId) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a doc comment update.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link

github-actions bot commented Jan 8, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: 4b3837d

@dignifiedquire dignifiedquire added this pull request to the merge queue Jan 8, 2025
Merged via the queue into main with commit f08d560 Jan 8, 2025
26 checks passed
@dignifiedquire dignifiedquire deleted the fix-relay-conn-cleanup branch January 8, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants