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

op-challenger: Avoid cancelling context until response data has been fully read #12588

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

ajsutton
Copy link
Contributor

Description

The context used for downloading prestates via HTTP was being exited after the request headers were read, but potentially before the full body was read which could lead to context cancelled errors while copying the response data to file.

Moves the timeout handling up a level so the context is only cancelled after the request is fully dealt with.

Tests

Increased size of response content in unit test so it reproduces the bug.

@ajsutton ajsutton requested a review from Inphi October 23, 2024 02:27
@Inphi Inphi added this pull request to the merge queue Oct 23, 2024
Merged via the queue into develop with commit 22d8365 Oct 23, 2024
48 checks passed
@Inphi Inphi deleted the aj/no-cancel-context branch October 23, 2024 04:37
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants