Skip to content

Always close typhon response body when present#179

Merged
cstorey-monzo merged 4 commits intomasterfrom
always-close-body-when-present
Feb 20, 2026
Merged

Always close typhon response body when present#179
cstorey-monzo merged 4 commits intomasterfrom
always-close-body-when-present

Conversation

@cstorey-monzo
Copy link
Copy Markdown
Contributor

@cstorey-monzo cstorey-monzo commented Feb 20, 2026

Re: #153

We previously didn't close the response body if we weren't going to send a body over the wire. However, this could cause a resource leak when the response body requires a resource that can't be handled by the garbage collector (eg: a goroutine).
This should fix that issue by slightly re-arranging the closure logic.

This changes the indentation slightly, so you'll want to view it ignoring whitespace.

@cstorey-monzo cstorey-monzo changed the title Always close response body when present Always close typhon response body when present Feb 20, 2026
@cstorey-monzo cstorey-monzo merged commit af70a0e into master Feb 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants