grpc-websocket-proxy icon indicating copy to clipboard operation
grpc-websocket-proxy copied to clipboard

[Bug] Leak

Open TheRealMal opened this issue 9 months ago • 0 comments

You call io.Pipe() at https://github.com/tmc/grpc-websocket-proxy/blob/673ab2c3ae75cc01952b84b88590e30e75dcf395/wsproxy/websocket_proxy.go#L186 then you lose it at https://github.com/tmc/grpc-websocket-proxy/blob/673ab2c3ae75cc01952b84b88590e30e75dcf395/wsproxy/websocket_proxy.go#L188 (When error happens at http.NewRequestWithContext you don't close requestBodyW and responseBodyW)

io.Pipe docs https://pkg.go.dev/io#Pipe

TheRealMal avatar May 24 '24 11:05 TheRealMal