Skip to content

Fix race between connection close and scheduling new request #546

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

Conversation

fabianfett
Copy link
Member

Motivation

We may have a race condition between scheduling a request on an http/1.1 connection and the connection being closed.

Changes

  • Fail request that is scheduled on a closed connection

Result

We don't crash anymore.

@fabianfett fabianfett requested review from Lukasa and weissi January 24, 2022 11:30
Copy link
Contributor

@weissi weissi left a comment

Choose a reason for hiding this comment

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

thank you!

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Jan 24, 2022
@Lukasa Lukasa merged commit ce3958f into swift-server:main Jan 24, 2022
fabianfett added a commit to fabianfett/async-http-client that referenced this pull request Jan 24, 2022
@fabianfett fabianfett deleted the ff-fix-race-close-vs-next-request branch April 12, 2022 06: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