-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
requestEnd() is not called in event listener in sync mode. #352
Comments
And... I see this dumbed down code works. I'll have to see what's causing it in my actual script, that didn't with old events. |
Okay, I misread my code a little. I've now narrowed it down into reproducible form. requestEnd() isn't called in sync mode:
requestEnd() is properly called when I wrap the solitary request in async/await.
|
And the cleaner working version...
|
Hey @whataboutpereira, this is expected behavior based on how the event works internally, but I can see this being unexpected behavior from an API user point of view. The thing is that |
I solved it by wrapping it in async like above. Perhaps mentioning it in the examples would be fine then. :) Thanks! |
I converted my timings collector (based on LogHttpArchive) to the new events system and requestEnd() doesn't get called when the last request has finished.
At this stage requestEnd() has not been called.
However if I add
\Amp\delay(0)
afterawait($futures)
, then requestEnd() is called.Is this as intended? Should I somehow await for the HTTP client to finish?
The text was updated successfully, but these errors were encountered: