Skip to content

fix(evm-core): wait for pending_tasks before completing MultiForkHandler#14728

Open
AissataF wants to merge 1 commit into
foundry-rs:masterfrom
AissataF:multiforkhandler
Open

fix(evm-core): wait for pending_tasks before completing MultiForkHandler#14728
AissataF wants to merge 1 commit into
foundry-rs:masterfrom
AissataF:multiforkhandler

Conversation

@AissataF
Copy link
Copy Markdown
Contributor

MultiForkHandler::poll returned Poll::Ready(()) as soon as handlers was empty and incoming was closed, even when pending_tasks still held in-flight ForkTask::Create futures. Those tasks register their handler only after they resolve, so an early exit dropped them and left the requesting sender waiting forever. Added pending_tasks.is_empty() to the exit condition so the future stays alive until every queued fork creation has settled.

…andler`

`MultiForkHandler::poll` returned `Poll::Ready(())` as soon as `handlers` was empty and `incoming` was closed, even when `pending_tasks` still held in-flight `ForkTask::Create` futures. Those tasks register their handler only after they resolve, so an early exit dropped them and left the requesting `sender` waiting forever. Added `pending_tasks.is_empty()` to the exit condition so the future stays alive until every queued fork creation has settled.
Copy link
Copy Markdown
Collaborator

@mablr mablr left a comment

Choose a reason for hiding this comment

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

makes sense, ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants