Fix #1001 CloneableRequestMessage fails to clone content and throws ObjectDisposed exception #1002
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes a bug where the CloneableRequestMessage underlying the LeakyBucketExecutionPolicy and the RetryExecutionPolicy classes would fail to clone the request's content if the request wasn't using
JsonContent
. It also fixes a bug that caused the original request to be disposed before the leaky bucket got a succesful response, thereby throwing an ObjectDisposedException.@clement911 I've temporarily reverted your changes for the 7.0 release so I could publish this (the action only publishes from one branch at the moment). I have some refactors and breaking changes I want to do for 7.0, so I've moved it to the branch
7.0-dev
and will open an issue tomorrow or Tuesday explaining my goals for 7.0!I'll get the action set up to publish from both branches as well so we can start publishing the 7.0 prereleases without merging them into master.