Skip to content

fix: close failed ping response bodies - #246

Merged
bdd merged 1 commit into
bdd:mainfrom
bensynapse:fix-ping-response-bodies
Sep 29, 2026
Merged

bdd merged 1 commit into
bdd:mainfrom
bensynapse:fix-ping-response-bodies

Conversation

@bensynapse

Copy link
Copy Markdown
Contributor

I run Live Tennis API.

HTTP retries leave discarded response bodies open. Failed pings also return before closing the final response, so repeated failures retain connections.

Close discarded responses before retrying. Keep the final response available to Post callers, and close it in ping on success or failure.

Seven regression cases fail before the fix. They cover successful retries, exhausted retries and permanent errors, with controls for successful responses and direct Post callers.

go test -race ./..., ./scripts/build and go vet ./... pass on Go 1.27.0. Formatting is clean.
The built client also passes three HTTP scenarios in the project's Docker image, including retry payloads and connection cleanup.

@bdd bdd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you

@bdd
bdd merged commit 41a6634 into bdd:main Sep 29, 2026
3 checks passed
@bdd

bdd commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Expect a new release by Oct 1.

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