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

debug/fix: internal rpc cancel safety #2407

Closed
wants to merge 6 commits into from

Conversation

Frando
Copy link
Member

@Frando Frando commented Jun 25, 2024

Description

Maybe flume is not cancel safe? If so, this might help to fix #2399

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates if relevant.
  • Tests if relevant.
  • All breaking changes documented.

// We cannot poll this in the tokio::select! because on completion a
// internal_rpc.accept() future could be dropped. But we need to clear
// finished tasks from the join_set to not amass them.
if let Some(Err(err)) = join_set.try_join_next() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this have to be a loop? We pass the join_set into spawn_rpc_request so we don't really know how many tasks there are per request.

Copy link
Contributor

Choose a reason for hiding this comment

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

this is just done so we clean them up eventually, current impl is also guranteed to be 1-1 but we can make that more explicit

@rklaehn
Copy link
Contributor

rklaehn commented Jun 26, 2024

This actually fixes things, but I think we can close it in favour of #2416

@Frando
Copy link
Member Author

Frando commented Jun 26, 2024

Yes, let's close it. Glad not having to do this for now.

@Frando Frando closed this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Netsim error: Expected header frame
3 participants