Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[BUG] Potential Handle Leak? #875

Closed
1 task done
stasos24 opened this issue Nov 28, 2023 · 1 comment · Fixed by #937
Closed
1 task done

[BUG] Potential Handle Leak? #875

stasos24 opened this issue Nov 28, 2023 · 1 comment · Fixed by #937
Labels

Comments

@stasos24
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

resp, err := http.ReadResponse(br, connectReq)

According to https://pkg.go.dev/net/http#ReadResponse
Clients must call resp.Body.Close when finished reading resp.Body

Expected Behavior

defer resp.Body.Close() at 77?

Steps To Reproduce

No response

Anything else?

No response

@ghost
Copy link

ghost commented Dec 11, 2023

The handle conn is returned to the caller a few lines after the code linked from the issue.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: ✅ Done
1 participant