-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #98 from manadart/v2-client-retry-fix
#98 When operating a MAAS controller via TLS, Juju can observe the following error during (sufficiently concurrent) provisioning: ``` net/http: cannot rewind body after connection loss ``` Based on pouring over the `http` standard library, this appears to happen for GET requests without a body, where the retry logic incorrectly replaces a `nil` body with a (non-nil) empty buffer. Here we avoid doing the body reset when it is `nil`. I was not able to recreate the exact failure scenario, but there is a new test that verifies that this change behaves correctly.
- Loading branch information
Showing
3 changed files
with
82 additions
and
22 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
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