-
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
refactor(iroh-relay)!: server actor task is not a task or actor anymore #3093
Conversation
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3093/docs/iroh/ Last updated: 2025-01-03T16:44:30Z |
bdfd4dd
to
0a172d8
Compare
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.
Some comments, but nothing blocking really.
// First priority, disco packets | ||
packet = self.disco_send_queue.recv() => { | ||
let packet = packet.context("Server.disco_send_queue dropped")?; | ||
self.send_disco_packet(packet).await.context("send packet")?; |
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.
This actor still blocks entirely while sending data to the sink. Looking at what else it does:
- cancel_token: will be potentially delayed if a write is slow. May not be ideal if this is used to try and stop a broken client.
- blocks receiving obviously. Not disastrous, but it could be faster.
So all in all this is probably not a serious problem, but rather a potential nice optimisation that could be done later.
061422d
to
c6d64fd
Compare
@@ -181,7 +178,7 @@ pub(crate) async fn recv_client_key<S: Stream<Item = anyhow::Result<Frame>> + Un | |||
|
|||
// TODO: variable recv size: 256 * 1024 | |||
let buf = tokio::time::timeout( | |||
Duration::from_secs(10), | |||
std::time::Duration::from_secs(10), |
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.
what happened here?
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.
flags, the import wasn't there anymore
Maybe best to wait with merging until the base PR is merged in main so it shows up as a separate commit? |
😭 yes, hopefully rebase will not be too bad.. |
6a5a78c
to
113519b
Compare
Description
Replaces #3073
Breaking Changes
iroh_relay::server::ClientConnRateLimit
toClientRateLimit
iroh_relay::server::MaybeTlsStreamServer
from the public APIiroh_relay::client::SendMessage::NotePreferred
Notes & open questions
Change checklist