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

Avoid infinite wait on bad response handling. #7954

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

yschimke
Copy link
Collaborator

From #7938

Avoid hanging on takeHeaders (incorrect 103 handling) when response body is empty.

If we mess up our logic (103 and so on), we call closeInternal on the stream from the timeout, but only if if source.isFinished() is false. For an empty body, this will be true, so the next waitForIo, would wait indefinitely.

@yschimke yschimke requested a review from swankjesse July 22, 2023 20:18
@swankjesse swankjesse merged commit 7308264 into square:master Oct 2, 2023
yschimke added a commit to yschimke/okhttp that referenced this pull request Oct 15, 2023
yschimke added a commit to yschimke/okhttp that referenced this pull request Oct 15, 2023
@yschimke yschimke deleted the fix_close2 branch October 15, 2023 11:52
swankjesse pushed a commit that referenced this pull request Oct 17, 2023
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