-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix 'Client.Endpoint' to not 'cancel' when bufferedStream (#776)
* transport/http/client_test: Modify the test to make it fail With this modifications we can trigger the error that we are searching, 'context canceled' * transport/http/client: Add the 'bodyWithCancel' to wrap the Response.Body It adds the context.CancelFunc to the io.ReadCloser.Close function so bouth are called together * transport/http/client: Add more documentation to clarify the changes Also abstracted some logic on the test to make it more clear and also added more docuemntation. Added more documentation on the definition of 'BufferedStream' to clarify that the Body has to be closed manually to properly close the response. * transport/http/client: Add period at the end of the doc of 'BufferedStream'
- Loading branch information
1 parent
ebd0dc0
commit ec0cc13
Showing
2 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters