gorilla/websocket

[BUG] Potential Handle Leak?

stasos24 opened this issue · 1 comments

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

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