Skip to content

Fix Request streaming memory leak #665

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

Fixes #663.

Changes

  • We need to drop references to the request body, that we execute in the RequestBag as soon as we can to destroy the reference cycle.
  • To make this easier to read I moved the redirectHandler into the state enum
  • We also don't retain the request in the ResponseAccumulator anymore

@fabianfett fabianfett added the 🔨 semver/patch No public API change. label Feb 7, 2023
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.

LGTM, thank you!

@fabianfett fabianfett force-pushed the ff-fix-request-streaming-leak branch from 47a3da5 to 4cc68e5 Compare February 7, 2023 14:57
@fabianfett fabianfett force-pushed the ff-fix-request-streaming-leak branch from 4cc68e5 to 6b89811 Compare February 7, 2023 15:01
@weissi weissi requested a review from glbrntt February 7, 2023 16:06
Copy link
Collaborator

@glbrntt glbrntt left a comment

Choose a reason for hiding this comment

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

LGTM

@fabianfett fabianfett merged commit f65f45b into swift-server:main Feb 7, 2023
@fabianfett fabianfett deleted the ff-fix-request-streaming-leak branch February 7, 2023 16:19
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.

AHC holds onto its body stream writer even after the request is complete
3 participants