Skip to content

Fix request hang if delegate fails promise returned by didReceiveBodyPart #633

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

Merged
merged 6 commits into from
Oct 7, 2022

Conversation

dnadoba
Copy link
Collaborator

@dnadoba dnadoba commented Oct 6, 2022

RequestBag.consumeMoreBodyData0(resultOfPreviousConsume:) should be called for errors thrown by the delegate instead of RequestBag.fail(_:).

Test added in the first commit hangs without the second commit which calls the right method.

@dnadoba dnadoba added the 🔨 semver/patch No public API change. label Oct 6, 2022
Copy link
Collaborator

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Member

@fabianfett fabianfett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome fix! Could not have it done it better :P

@dnadoba dnadoba enabled auto-merge (squash) October 7, 2022 15:03
@dnadoba dnadoba merged commit f7a84af into swift-server:main Oct 7, 2022
@dnadoba dnadoba deleted the dn-fail-request-bag branch October 7, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants