websocket
websocket copied to clipboard
[BUG] Potential Handle Leak?
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
https://github.com/gorilla/websocket/blob/6f5d2139f4b96d5edfe6c1aac4fe87fed8d7f9fd/proxy.go#L70
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.