You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm thinking the problem is here. We're reading from res.Body whether doHttpRequest() returns an error or not. There's probably a scenario where the HTTP request fails, leaving the response body nil.
Oh, good call. So I think I started the pattern of reading the extra request body to ioutil.Discard so that the keep-alive connection can get released back to the pool. But if there's an error, it gets released anyways.
Activity
[-]Intermittent null pointer when pushing[/-][+]Intermittent error when pushing[/+]rubyist commentedon Jul 6, 2015
I'm thinking the problem is here. We're reading from
res.BodywhetherdoHttpRequest()returns an error or not. There's probably a scenario where the HTTP request fails, leaving the response bodynil.technoweenie commentedon Jul 6, 2015
Oh, good call. So I think I started the pattern of reading the extra request body to
ioutil.Discardso that the keep-alive connection can get released back to the pool. But if there's an error, it gets released anyways.Check doHttpRequest() error in UploadObject()