Manish R Jain · May 12, 2023
TIL: Go Response Body MUST be closed, even if you don’t read it
0Sign in to vote or save
This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.
I recently witnessed a goroutine leak in my Go server. It looked like this. goroutine profile: total 41053 20524 @ 0x43a656 0x44a7fe 0x65c512 0x46bec1 # 0x65c511 net/http.(*persistConn).writeLoop+0xf1 /usr/local/go/src/net/http/transport.go:2410 20523 @ 0x43a656 0x44a7fe 0x65b425 0x46bec1 # 0x65b424 net/http.(*persistConn).readLoop+0xd84 /usr/local/go/src/net/http/transport.go:2227 Searching…
Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.