Skip to content

lb: fix http client leak#21

Open
alrs wants to merge 1 commit intoeduardonunesp:masterfrom
alrs:close-leak
Open

lb: fix http client leak#21
alrs wants to merge 1 commit intoeduardonunesp:masterfrom
alrs:close-leak

Conversation

@alrs
Copy link
Copy Markdown

@alrs alrs commented Apr 16, 2026

This is a simple change that has a needlessly confusing diff.

defer resp.Body.Close() was being called in an infinite loop, meaning it never fired. This put the entire contents of the for loop into an anonymous func() so that the defer happens once per loop.

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.

1 participant