Skip to content

[HttpClient] Fix handling timeouts when responses are destructed #42894

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

Closed
wants to merge 1 commit into from

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 5.3
Bug fix? yes
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

Spotted while giving a workshop on HttpClient at WebSummerCamp:

When responses are destructed, the timeout is counted from the call to the destructor. This means that when 10 concurrent requests are destructed and they all timeout, the code waits for 10 * $timeout before giving back control.

This PR fixes it by counting the timeouts from the first timeout when they happen in chain on destruction.

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Sep 6, 2021

Closing in favor of #42896 which is on 4.4

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

Successfully merging this pull request may close these issues.

2 participants