Closed BrianIp closed 9 years ago
Fix tcp connection leak by closing Body from an http.Get. Potentially fixes https://github.com/outbrain/orchestrator/issues/37, if not, fixes another leak anyways.
Will merge; but need to check if response != nil before derering
if response != nil
Moved the defer response.Body.Close() to after checking err. According to golang specs, Get returns a non-nil response.Body if err is nil.
defer response.Body.Close()
Fix tcp connection leak by closing Body from an http.Get. Potentially fixes https://github.com/outbrain/orchestrator/issues/37, if not, fixes another leak anyways.