-
Notifications
You must be signed in to change notification settings - Fork 180
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
Conversation
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 |
iroh-relay/src/server/clients.rs
Outdated
/// 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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Description
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
Breaking Changes
Notes & open questions
Change checklist