Skip to content

the delegate's didSendRequestPart is invoked at the wrong point in time #565

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
weissi opened this issue Mar 15, 2022 · 2 comments
Closed
Labels
kind/bug Feature doesn't work as expected.

Comments

@weissi
Copy link
Contributor

weissi commented Mar 15, 2022

Since version 1.6.0 (it worked in 1.5.1), AHC seemingly invokes the delegates didSendRequestPart method when the write of the body part is started and not when the write has succeeded.

That's pretty bad because a user might trigger the generation of the next data to send in this delegate method which therefore might break backpressure.

@weissi weissi added the kind/bug Feature doesn't work as expected. label Mar 15, 2022
@weissi
Copy link
Contributor Author

weissi commented Mar 15, 2022

@Lukasa
Copy link
Collaborator

Lukasa commented Mar 16, 2022

Yup, this definitely isn't right. We could chain the backpressure either off the write promise or the same backpressure future we're using for the StreamWriter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Feature doesn't work as expected.
Projects
None yet
Development

No branches or pull requests

2 participants