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

[8,x] Share handler instead of client between requests in pool to ensure ResponseReceived events are dispatched in async HTTP Request #38380

Merged
merged 4 commits into from
Aug 16, 2021

Conversation

sdkawata
Copy link
Contributor

Currently, ResponseReceived events is not dispatched in async HTTP Request

This is beacause PendingRequest::$request is not set and following if statement not passes.

PendingRequest::$request is set in the handler given to guzzle client.
All requests in Pool use shared Pool::$client and the handler in the Pool::$client set request to the PendingRequest instance which created in the initialization of Pool::$client
not each PendingRequest instances created in Pool::asyncRequest().

To fix this, each request share handler instead of client in this PR.

@taylorotwell taylorotwell merged commit b070f03 into laravel:8.x Aug 16, 2021
@sdkawata sdkawata deleted the send_received_event_in_async branch August 17, 2021 02:46
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