Repository navigation
Return an error when runtime shutdown cancels address resolution - #76
Merged
Merged
Conversation
spawn_blocking is fallible: dropping the tokio runtime cancels new blocking tasks while async tasks can still be polled briefly. resolve() unwrapped the JoinError and panicked; it now returns an Interrupted io::Error and resumes panics from the closure. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
bmwill
approved these changes
Oct 8, 2026
Clippy 1.99 flags functions returning anemo::rpc::Status by value. Boxing it would change the public and generated APIs, so allow the lint on the two rpc functions and in the generated client and server modules, which downstream crates compile. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Address::resolveran DNS resolution withspawn_blocking(..).await.unwrap().spawn_blockingis fallible: when a process drops its tokio runtime, the blocking pool cancels new tasks while async tasks can still be polled briefly, so the unwrap panicked during graceful shutdown. A cancelled task now returns anInterruptedio::Error, whichresolve's callers already handle; a panic in the resolver is resumed.Found by Sui simtests that model graceful shutdown (runtime drop) in mysten-sim.
A second commit allows
clippy::result_large_err, which clippy 1.99 (used by CI'sstable) reports for functions returninganemo::rpc::Statusby value. BoxingStatuswould change the public and generated APIs, so the lint is allowed on the two rpc functions and in the generated client and server modules.Test plan
New unit test resolves an address on a runtime whose blocking pool is shut down and expects
Interrupted; it fails with the old unwrap.🤖 Generated with Claude Code