Closed flub closed 1 week ago
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/2914/docs/iroh/
Last updated: 2024-11-12T10:19:16Z
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: c4593f7
I believe the else
branch will only execute if none of the other branch's patterns match. Since the _ = cleanup_interval.tick()
pattern can never not match, the else branch won't ever execute.
I believe the
else
branch will only execute if none of the other branch's patterns match. Since the_ = cleanup_interval.tick()
pattern can never not match, the else branch won't ever execute.
@PaulOlteanu thanks for the insight! I guess my metal model of select's branch matching is all wrong.
The docs say that the first branch that completes is returned and all other futures are cancelled. So I was considering at that point there's one value, None
, which does not match its pattern so the else branch is executed.
Re-reading the docs:
If the pattern does not match, disable the current branch for the remainder of the current call to select!. Continue from step 3.
So this is why I had this totally wrong, as long as there are enabled branches select does not move on to the else branch or return.
Thanks for making me realise what I had done wrong!
github actions network issues it seems like? try again
Description
When the endpoint is dropped the rtt-actor should be shut down. This makes sure this actually happens.
Fixes #2911
Breaking Changes
Notes & open questions
Also make sure the task is aborted on drop. We should always do this anyway.
Change checklist