Skip to content

Conversation

@fabianfett
Copy link
Member

Motivation

If a RequestBag was consuming received http body parts in its HTTPClientResponseDelegate in the didReceiveBodyPart and received a succeedRequest, the didFinishRequest was called before the didReceiveBodyPart future was resolved.

Changes

  • Call didFinishRequest only once the didReceiveBodyPart future was succeeded.

Result

@fabianfett
Copy link
MemberAuthor

swift-nightly fails because of Sendable requirements.

@fabianfettfabianfett merged commit 316cbf9 into swift-server:mainSep 27, 2021
@fabianfettfabianfett deleted the ff-fix-race-condition-on-close branch September 27, 2021 13:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🔨 semver/patchNo public API change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@fabianfett@Lukasa