Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
retrieveDeviceAuth: Call r.Body.Close()
Close the response body after reading it in the DeviceAuth logic. The retrieveDeviceAuth function did not close the response body. However, the net/http documentation states that one is expected to close the response body after one sends an HTTP request and reads the response body. In addition, the doTokenRoundTrip function *does* call r.Body.Close(). (Some other functions use a client with a custom Transport that automatically closes the body, but that is not the case for retrieveDeviceAuth or doTokenRoundTrip.) Follow-up to commit e3fb0fb. * deviceauth.go (retrieveDeviceAuth): Call r.Body.Close() after reading r.Body.
- Loading branch information