-
Notifications
You must be signed in to change notification settings - Fork 135
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
perf: improve derp connection establishment #1631
Conversation
iroh-net/src/derp/http/client.rs
Outdated
let err = first_err.unwrap(); | ||
Err(err) | ||
|
||
Err(first_err.unwrap()) |
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.
seems a bit arbitrary to just return the first error.
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.
logging them at least now
iroh-net/src/derp/http/client.rs
Outdated
let conn = this.dial_node(&node).await; | ||
match conn { | ||
Ok(conn) => Ok((conn, node)), | ||
Err(e) => Err(e), | ||
} |
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.
optional, but isn't this this.dial_node(&node).await.map(|c| (c, node))
?
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
iroh-net/src/derp/http/client.rs
Outdated
} | ||
Err(e) => { | ||
if first_err.is_none() { | ||
first_err = Some(e); |
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.
related to @rklaehn 's comment below, unless you return a Vec of errors you'll always have an arbitrary choice. Probably easier is to tracing::error!()
log all the error cases here? or at least warn!
.
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
doctor derp-regions
command